[dba-SQLServer]Selecting data into variables

David Emerson davide at dalyn.co.nz
Tue Oct 7 22:55:49 CDT 2003


I would like to run a select statement that returns 1 row, then put the 
column values into variables I have declared in my Sproc.  The closest I 
have come across in BOL is the SELECT INTO statement but this is for 
"Embedded SQL for C and SQL Server".

I could use a cursor but it seems overkill for only one row.  Is there an 
easy way to do this?

Regards

David Emerson
DALYN Software Ltd
25b Cunliffe St, Johnsonville
Wellington, New Zealand
Ph/Fax (877) 456-1205 



More information about the dba-SQLServer mailing list