June 8, 2012 at 9:14 am
Hello to all you gurus!
Newbie to the max here! I have a stored procedure that returns a dataset (very wide) and I need to return just a subset of columns of said dataset (after performing some calculations and groupings). Since I cannot modify this SP because it is widely used by several other processes/applications, I was thinking about creating another stored proc, call this existing proc and store the dataset in a table variable and go from there but seeing that it returns almost 100 columns, it is very daunting. :sick:
Is this the right approach or is there another way to accomplish this in a more efficient/best practices way?
As usual, thank you all in advance for any help/direction you can provide.
Kind regards,
June 8, 2012 at 9:30 am
Depending on how many rows are returned, you may want to use a temporary table instead of a table variable. Other than that, it sounds like you are on the right track.
June 8, 2012 at 3:39 pm
Thanks Lynn!
I guess I was just looking for confirmation. I did end up using a temp table for the rest of the manipulation and it is all good now.
Again, thank you!
😀
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply