Hi,
I've recently started work at a new company which has a product running on asp.net with ms sql server as the back end
98% of all business logic sits inside stored procedures, with asp.net mainly handling the UI. This I'm fine with, even if I hadn't previously done much with stored procedures as such.
My problem comes with some of the old t-sql code I'm now maintaining. Some of the procedurs use a lot of #temptables, as well as declare @temptable to store temporary stuff (think around 10-15 for one sproc), prior to returning the final result set
Not having been exposed to sql server sproc programming before (I know sql just fine), I was wondering if this is the accepted norm of doing this, or if this points at trying to force tsql to do stuff it hasn't been designed for, or if it points at inefficient db design.
Opinions?
I've recently started work at a new company which has a product running on asp.net with ms sql server as the back end
98% of all business logic sits inside stored procedures, with asp.net mainly handling the UI. This I'm fine with, even if I hadn't previously done much with stored procedures as such.
My problem comes with some of the old t-sql code I'm now maintaining. Some of the procedurs use a lot of #temptables, as well as declare @temptable to store temporary stuff (think around 10-15 for one sproc), prior to returning the final result set
Not having been exposed to sql server sproc programming before (I know sql just fine), I was wondering if this is the accepted norm of doing this, or if this points at trying to force tsql to do stuff it hasn't been designed for, or if it points at inefficient db design.
Opinions?