February 16, 2011 at 5:43 am
I have a .NET process that constructs a report, with optional columns from variable parameters. The process first creates a temporary table with nulls for all the optional columns, then a second call populates the optional columns from the parameters supplied.
Now our DBAs in their wisdom(?) have denied CREATE TABLE in tempdb. I can use #Tmp tables. Obviously the #Tmp table would not be there for the second call.
Is there a way to persist a temporary table in .NET between calls?
February 16, 2011 at 5:59 am
Why can't you do all of the processing in 1 batch (create, populate, select, drop)?
February 16, 2011 at 6:10 am
You mean chain all the dynamic SQL into one ';' separated string and do a single call?
I'll give it a try.
February 16, 2011 at 6:13 am
Exactly... simple way to solve the problem!
February 16, 2011 at 6:31 am
Works fine, and all I had to do is reorder a few lines in the C#. 😀 Many thanks.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply