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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ssis question 1

Status
Not open for further replies.

FALCONSEYE

Programmer
Joined
Jul 30, 2004
Messages
1,158
Location
US
I am working on my first Integration Services project. The idea is to import two excel files. My question is how do i define the data source so that the excel file name and location are dynamic?
any links or any suggestions will be appreciated.
thanks

 
Use a script task and change it on the fly

example

Code:
Dim theDate As DateTime = DateTime.Now()

        Dim theHour As String = theDate.ToString("HH")
        Dim FILE_NAME_IN As String = "\\someserver\devshare\WM\ba" + theDate.ToString("ddMMyy") + theHour + "xls"
        Dts.Connections("ExchangerateFile").ConnectionString = FILE_NAME_IN

Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQLBlog.com, Google Interview Questions
 
Or use a For Each loop container and set it to enumerate for files, and point it at the directory that holds the files you want to process.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top