Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a sql variable in a data flow

Status
Not open for further replies.

rsx

Programmer
Dec 12, 2002
28
CA
Hello

I have set a variable using a Script Task that assigns a select statement. This works fine.

However, when I select the variable in the data flow object ( within the OLE DB Source object ) I receive an error saying "Command text was not set for the command object"

I am using the script task because my table name changes everyday with a current date stamp on it: TableName_20091029. So I need a dynamic select statement:

select * from tablename_20091029.

Can anyone provide any help on this?


Thanks very much,
Andy.


 
In your SQL Task you'll need to set an SSIS variable to the value, then within your data flow task reference the SSIS varaible.

Denny
MVP
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration)
MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI)

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top