Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debugging a WHILE EXISTS
Message
De
02/11/2008 14:18:01
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01358902
Message ID:
01359014
Vues:
39
>The EXISTS operator only checks if there are any records for specified conditions. It cannot return data. I'm not sure why do you need loop in the first place. Try
>
>UPDATE r SET NoField = f.Numero 
>	FROM Relation r 
>JOIN Field f ON r.Field = f.Field
>
>UPDATE r SET NoField2 = f.Numero 
>	FROM Relation r 
>JOIN Field f ON r.Field2 = f.Field
>
Ok, thanks, but I need to apply more logic. So, I need to select the records at first and loop. What adjustment would I need to do to support that?
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform