Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OK - how do you do this
Message
From
28/12/2000 15:28:02
 
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00457333
Message ID:
00457558
Views:
24
>Ken,
>
>It is true that any temp. tables created within dynamic sql are scoped to the dynamic sql. BUT, if the temp table exists BEFORE the dynamic sql, it is within scope:
>
>CREATE TABLE #x (c int)
>
>EXECUTE ('insert into c values (1)')
>
>-Mike

Mike,

yeah - I discovered this - and is what I am using - thanks! I still think it is a PITA though :(

I also found out how to return into variables using sp_executesql, and that helps in a couple other instances. This was actually not in the SQL docs (at least I couldn't find it) I discovered it at SQL Expert site.

Thanks for your help!
Ken B. Matson
GCom2 Solutions
Previous
Reply
Map
View

Click here to load this message in the networking platform