December 11, 2008 at 9:40 am
I build a couple of temp tables in my stored procedure. When I am debuggin, I cannot figure out how to see the contents of the temp table. This is probably easy to do, it just escapes me how to do it...
Thank you for any help you can provide.
December 17, 2008 at 2:24 pm
Why can't you run the parts of the procedure up to the point the temp table is created and populated, then do a SELECT * from the temp table?
Greg
_________________________________________________________________________________________________
The glass is at one half capacity: nothing more, nothing less.
December 17, 2008 at 3:04 pm
I tried that but it throws a 'Invalid object name '#DistinctEmail'.' with #DistinctEmail being the temp table.
December 18, 2008 at 5:59 am
Can't believe the rubbish I wrote first time. You need to put the SELECT inside the stored procedure. A temporary table is only visible to its creator and only exists for as long as the creator exists. So a temporary table created by a stored procedure will disappear when the stored procedure terminates.
December 18, 2008 at 10:14 am
Cool...I love you. Invaluable peice of information.
December 18, 2008 at 10:16 am
Forgot to mention that your suggestion helped.
December 18, 2008 at 10:19 am
Glad to be of assistance.
Mike
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy