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.
| Author |
Topic |
|
smartlizard
Starting Member
24 Posts |
Posted - 2002-02-23 : 00:25:02
|
| I have 50 text files (each with sequenced file names) that I would love to run the same DTS package on to import the data.Any way to do this automatically without having to open up the DTS package and selecting the next file as the source?Each Text file is 6-7 gigs each, so it sure would be nice not to have to baby sit it!Thanks.Ron Sellhttp://smartLIZARD.com |
|
|
maloy
Starting Member
19 Posts |
Posted - 2002-02-23 : 02:10:18
|
| How are you importing the data in the package? r u using stored procedure or bulk copy task?If u use sproc, u may write some dynamic sql with the bulk insert command and use sp_executesql to change the name of the file. You could use a loop task to change the value of the text file name. save it as a global variable and pass as i/p param to the sproc using bulk insert.FMI see "Bulk Insert" and "Using ActiveX scripts in DTS" in SQL Svr Books Online |
 |
|
|
smartlizard
Starting Member
24 Posts |
Posted - 2002-02-23 : 10:48:33
|
| I created a simple DTS Package with a "Connection 1" which is the text file and A "Connection 2" which is the SQL Table and a transfermation between the two that mostly just copies the data column to column except for one field, I had to transform the date to the correct order.Ron Sellhttp://smartLIZARD.com |
 |
|
|
|
|
|