Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 variable

Author  Topic 

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2012-11-15 : 14:00:55
[code]
I've a package variable "varmodby" which is a string datatype and value =Update_Table_name
that I want to feed into a stored procedure without directly assiging the value to storedprocedure.

Below is storedprocedure

declare @p_PCount int,
@p_FCount int

Exec [dbo].[usp_Process]'Update_Table_name',1,
@p_PCount output,
@p_FCount output
select @p_PCount, @p_FCount


Please help.

[/code]

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-11-15 : 22:39:10
use execute sql task.
Add three variables in SSIS one for tablename and two for getting output values
use statement like below




Exec [dbo].[usp_Process] ?,1,
? output,
? output


then in parameters tab map variables to correct parameter positions as


parameter variable direction
---------------------------------
Parameter0 variable1 input
Parameter1 variable1 output
Parameter2 variable2 output

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2012-11-16 : 11:23:09
Thanks visakh
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-11-16 : 23:00:16
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -