Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Syntax qustion when creating TEMP table on the fly
Message
 
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00778391
Message ID:
00778429
Views:
11
Hi!

I don't understand the second question,

but for the first one I think this could be helpfull:

instead of:

@cSQLCmd = 'SELECT ' + cSQLLine + ' FROM INSERTED'
INSERT INTO #TempTbl EXEC (@cSQLCmd)

you can do this:

@cSQLCmd = 'SELECT ' + cSQLLine + ' INTO ' + @cTempTbl + ' FROM INSERTED'

having in @cTempTbl the name of your temporary table.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform