Reputation: 3889
I have an Exec SQL Task that runs a simple select statement but is it possible to capture the result value and to map the resulting value to a variable?...i've tried but have not been successful [Sad]
Upvotes: 1
Views: 67
Reputation: 20367
this does not work if the select statement returns more than one value
declare @ a int
select @a= Column1 from Table_A
Upvotes: 0
Reputation: 3254
DECLARE @var INT
SET @var = (SELECT age FROM some_table WHERE id = 2)
Upvotes: 1