Link to home
Start Free TrialLog in
Avatar of nani22
nani22

asked on

SSIS passing result set from one sql task to other

i have a sql task which executes a stored procedure which has some variables in it,i want to use the result set to input to next sql tasks in ssis.how do i achieve this.
it looks like this

cretae proc sp1(@ par1 int,@par2 varchar(50),@par3 varchar(50))
as begin
declare @var1 varchar(50)
declare @var2 int
declare @var3 int

update -----

insert----

select @var1=some calculated value
select @var2=some calculated value

end

create proc sp2(@var1 varchar(50))

create proc sp3(@var2  int)

i am using a sql task to execute the sp1,i need to givs these varibles inside the sp1 as the parameters to next 2 sql tasks which executes sp2 and sp3.how can we do this.


Thanks
ASKER CERTIFIED SOLUTION
Avatar of Reza Rad
Reza Rad
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nani22
nani22

ASKER

but what if the sp1 returns multiple select statements besides the select variables.
>>but what if the sp1 returns multiple select statements besides the select variables.<<
this is not good for ssis,
in fact, ssis can not analyze the result, ssis just assign first row of result to variables, index 0 will be first column , index 1 will be second column and ....
Avatar of nani22

ASKER

dwfnlkjdsnf