allelopath
asked on
Assign result set to scalar?
I have a standard procedure where MyNumber is passed in as a parameter.
Using it, I want to get the value of tblMyTable.MyId and assign it to @MyId
How do I do this?
Using it, I want to get the value of tblMyTable.MyId and assign it to @MyId
How do I do this?
DECLARE @Myid as int
select [Myid] from [MyDB].[dbo].[tblMyTable]
where [MyNumber] = @MyNumber
-- @MyId = [Myid] ???
-- use @Myid at this point
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window