Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debugging a WHILE EXISTS
Message
De
02/11/2008 16:46:03
 
 
À
02/11/2008 16:18:07
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:
01359039
Vues:
32
>And just because I don't like cursors :-)
>
>DECLARE @lcField Char(40)
>DECLARE @lcField2 Char(40)
>DECLARE @lnNumero Integer
>DECLARE @lnNumero2 Integer
>DECLARE @loRecord nvarchar(128)
>
>DECLARE @crsRelation TABLE (Numero (the type here), 
>                           Field  (type here), 
>                           Field2 (type here),
>                           ID int IDENTITY(1,1))
>INSERT INTO crsRelation
>SELECT Numero,Field,Field2 FROM Relation
>DECLARE @id int, @maxid int
>SELECT @maxid = MAX(Id) FROM @crsRelation
>SET @Id = 1
>WHILE @Id <= @MaxId
>      BEGIN
>         SELECT .....
>          
>
>         SET @Id = @Id + 1
>      END
>
Thanks
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
Répondre
Fil
Voir

Click here to load this message in the networking platform