Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Common Table Expressions valid for more than one command
Message
 
To
29/06/2015 15:28:08
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01621564
Message ID:
01621566
Views:
45
>Is there a way to have a Common Table Expression valid for more than one command in the script? Presently, I have to repeat the same command again, later down the script, so it would be available for other commands.

Maybe DECLARE a table variable and insert the result from CTE into it.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform