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 1, 2010 12:13 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, September 9, 2014 3:03 AM
Points: 1,062, Visits: 708
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 4, 2010 6:05 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 12:49 AM
Points: 12,949, Visits: 10,719
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


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 12:49 AM
Points: 12,949, Visits: 10,719
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