randyt
SSC Veteran
Points: 202
More actions
September 24, 2002 at 11:48 am
#78872
is it possible to set more than one local variable from just on select
ie
declare @comp_id varchar(12)
declare @prodno varchar(12)
set @comp_id,@prodno = select comp_id,prodno
from stock
where stock_id = '11'
thanks
Randy
Greg Larsen
SSC-Insane
Points: 20961
September 24, 2002 at 12:12 pm
#437201
Something like this should work for you:
select @comp_id=comp_id,@prodno=prodno
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
Gregory A. Larsen, MVP
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply