Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select and Update from CTE
Message
From
30/06/2015 13:58:48
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01621599
Message ID:
01621602
Views:
26
>If you're using SQL Server 2008 and up, you don't even need to use temp table for OUTPUT, you can perform one complex UPDATE command using its output as derived table in the UPDATE. I forgot the proper term for this at the moment, but I know where to search for it.

I wasn't sure if there was a way to update and delete in the same command. If that would be the case, I can get rid of the second duplicate CTE command to recreate all this.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform