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 2005 Forums
 SSIS and Import/Export (2005)
 SSIS Package with a variable

Author  Topic 

TRACS
Starting Member

5 Posts

Posted - 2009-04-21 : 16:13:10
I have been trying to figure out how to pass a variable to an SSIS Package at execution time. I need to pass an integer to my SQL query. I have been trying to declare variables within the SSIS query builder area in Visual Studio 2005 without any luck. A stored procedure should be able to run a query to get my variable value before plugging it into my SSIS Package. I know that this is a basic question and I have tried to search but without examples that are basic.

Variable: Select max(NRR_ID) FROM NRR

I need a little help with the syntax as well. The Query that is in the SSIS Package is as follows:

Select NRR_ID, NRR_NARRATIVE_LONG FROM NRR WHERE NRR_ID>@Variable

Your assistance is greatly appreciated

nr
SQLTeam MVY

12543 Posts

Posted - 2009-04-21 : 17:09:20
How are you running the package?
dtexec allows you to set variables.

You can also set the variable in the package from a query.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -