tags:

views:

24

answers:

2

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]

A: 
DECLARE @var INT
SET @var = (SELECT age FROM some_table WHERE id = 2)
Flakron Bytyqi
A: 

this does not work if the select statement returns more than one value

declare @ a int

select @a= Column1 from Table_A
DForck42