Click here to monitor SSC
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
UDP Broadcaster
UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)

Group: General Forum Members
Points: 1448 Visits: 992
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
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16538 Visits: 13210
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?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
mp83399
mp83399
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 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
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16538 Visits: 13210
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?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
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