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 |
|
OnezerO
Starting Member
4 Posts |
Posted - 2004-09-29 : 10:49:33
|
| I have a need to import seasonal data from a flat file into a couple of tables. For instance, I get a data file sent to me on CD in March and another one in September. The data layout for these flat files are exactly the same. I have two tables created; MarData & SepData.I have been able to succesfully import this data into the MarData table and what I would like to be able to do is either of the following:1) I would like to be able to modify/reuse the DTS package to import the September file into the SepData table without having to create a new DTS package to do so. Can this be done and what is the procedure for doing so?2) How can I generate an SQL Script from a DTS package so that I can modify the table names in the script to accomplish the same task on a different table?The data on the CD's I receive are always named the same and have the same data layout with the only difference being the actual data itself. I need to maintain several snapshots of this data for comparison.The data files are huge with a record length of 3000 characters. It is a big hassel to identify column breaks on these files and I want to avoid having to do so for each seasonal data file that I need to import (I have several years of this data to import).Any help is greatly appreciated. Thanks. |
|
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2004-09-30 : 12:13:44
|
| Since the files are large and of a standard format, I'd be tempted to use a bulk insert task rather than a data transformation. This way, you can use a single bcp format file for both file types.Mark |
 |
|
|
|
|
|