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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 variable
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 11/15/2012 :  14:00:55  Show Profile  Reply with Quote

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.

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 11/15/2012 :  22:39:10  Show Profile  Reply with Quote
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 - 11/16/2012 :  11:23:09  Show Profile  Reply with Quote
Thanks visakh
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 11/16/2012 :  23:00:16  Show Profile  Reply with Quote
welcome

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

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000