SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


pass SSIS Variables to SQL Procedure in SSIS


pass SSIS Variables to SQL Procedure in SSIS

Author
Message
Pulivarthi Sasidhar
Pulivarthi Sasidhar
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4384 Visits: 1030
hi,

I have two varibles .....

I want to execute the sp with two variables as parameters...


Execute testing.dbo.proc_TEmptest value1,value2

The value1 and value2 are the SSIS values of variables.

Please help how to pass the SSIS variables to SP as parameters

Thanks,
Pulivarthi
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)

Group: General Forum Members
Points: 145914 Visits: 13350
Try the following:

create a variable of type string. Let's call it str_ExecSP.
Populate this variable with the following expression:

"EXEC dbo.proc_TEmptest " + (DT_WSTR,50) @[User::value1] + " , " + (DT_WSTR,50) @[User::value2] 



Then use this variable in an Execute SQL Task. As SQLSourceType, select variable.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
mp83399
mp83399
SSC Rookie
SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)SSC Rookie (40 reputation)

Group: General Forum Members
Points: 40 Visits: 3
You can set up an ExecuteSQLTask. Put the call your sp as :

exec testing.dbo.proc_TEmptest ?,?

(The '?' are the place holders)Now map these two question marks to the SSIS variables in your package by going to the parameters tab in the ExecuteSQLTask.
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)SSC Guru (145K reputation)

Group: General Forum Members
Points: 145914 Visits: 13350
mp83399 (8/28/2012)
You can set up an ExecuteSQLTask. Put the call your sp as :

exec testing.dbo.proc_TEmptest ?,?

(The '?' are the place holders)Now map these two question marks to the SSIS variables in your package by going to the parameters tab in the ExecuteSQLTask.


I sure hope the OP solved his problem 2 years ago ;-)


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search