Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT INTO syntax
Message
 
 
À
20/10/2002 12:49:47
Ron Hodge
Sebrex Systems, Inc.
Dacula, Georgie, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00713308
Message ID:
00713310
Vues:
14
Yes, you can select into variables this way
SELECT @Parent_Lsonid=lsonid, 
       @Parent_Rsonid=rsonid 
  FROM Assoc WHERE ImdNum = @Up_Spid
Regarding cursors, they are in general slower than set oriented commands but it doesn't mean you've to avoid them at all costs. If you tell us what you're trying to do maybe someone can provide you with pointers or even with solution.

>I have seen an examples of SELECT INTO variables, and I've tried to do the following:
>
>DECLARE @Parent_Lsonid char(15),
> @Parent_Rsonid char(15)
>
>SELECT lsonid, rsonid into @Parent_Lsonid, @Parent_Rsonid FROM Assoc WHERE ImdNum = @Up_Spid
>
>My question: Does SQL 2000 support the SELECT INTO variables, in addition to SELECTing INTO tables? I'm working on manipulating a binary hierarchy and I'm trying to avoid using cursors, which I understand are very slow.
>
>Thanks.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform