Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simplifying WHERE clause with CASE WHEN
Message
 
 
À
21/04/2015 14:22:22
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01618887
Message ID:
01618896
Vues:
24
>>So, turn the UPDATE into select into CTE first and then UPDATE CTE if there is always 1 to 1 relation between table to update and the other tables.
>
>If this would be a single update, that would do. I would be able to select into a temporary table and use that table in the second command (the update). But, in this case, this is a massive update of all the records in the table so I do not think this approach could work.

Why would not you post the actual UPDATE command (you can disguise column names if you want) and then it will be easier to give you the code. In any case, I don't see why the suggested approach is not going to work. You can always split one command into 2 using CTE (common table expression).
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform