Yes, I use stored procs for heavy lifting that I don't want to bring across the wire. "Just give me the final (aggregated) dataset."
On 7/24/2020 9:23 AM, Stephen Russell wrote:
I'll bite. If you don't use sprocs for standard CRUD operations, why do you need them? Do you work with a great deal of 4th normal data that the joining of the same tables over and over is easier in a sproc? Or do you have a process like EOM where you are doing repetitive things to data tables? Maybe it is good for dealing with data in separate systems/environments that allow you to get warehousing data from WHS and then issue pick tickets and truck lists to move it all?
My most used sproc gets shipping data from the ERP and pull specifications from of BOM system for each item, and then averages metrics from our test system by item by lot giving the customer a Certificate of Analysis. I pull AD data to determine who are the managers at that plant for every truckload we ship.
On Thu, Jul 23, 2020 at 9:27 PM MB Software Solutions, LLC < mbsoftwaresolutions@mbsoftwaresolutions.com> wrote:
On 7/23/2020 8:07 PM, Stephen Russell wrote:
Pretty much for anything that is repetitive in nature. All apps yes. I have the instances set to not allow homemade sql except for some of our
new
stuff in R, or my certificate report that passes SQL to include all of
the
Lot Numbers needed. It is on a separate sql server and operates very slowly if I use a where in with code that executed at the calling server.
Why would you NOT use sprocs is my #1 question?
Years ago there was the debate as to whether you put all the logic into your backend database or DataObject class...I went for the latter. Gave me easier portability if I ever needed it. (And actually, I did...I went from VFP backends to MySQL/MariaDB 15 years ago. Required VERY LITTLE code changes!) Now that doesn't mean I don't use stored procedure...I do! I just don't use them for basic INSERT/UPDATE/DELETE statements. I do use triggers though too.
-- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
[excessive quoting removed by server]