Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

pass SSIS Variables to SQL Procedure in SSIS Expand / Collapse
Author
Message
Posted Friday, October 01, 2010 12:13 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Wednesday, May 08, 2013 5:30 AM
Points: 870, Visits: 522
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

Post #996446
Posted Monday, October 04, 2010 6:05 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 2:11 AM
Points: 9,378, Visits: 6,473
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 LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #997483
Posted Tuesday, August 28, 2012 6:53 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 28, 2012 6:50 PM
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.


Post #1351350
Posted Tuesday, August 28, 2012 11:40 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 2:11 AM
Points: 9,378, Visits: 6,473
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 LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1351396
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse