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--