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 |
oitsubob
Yak Posting Veteran
70 Posts |
Posted - 2006-02-28 : 20:17:31
|
Hey All!I'm getting a couple fixed width data files FTP'd to me from another department that contain a header and a footer. Before I load that data to my database (SQL2K), I wanted to strip off the header and footer and either combine both files into one or load seperately.Is there a simple solution here or am I going to have to write some VB code to loop over the files, one at a time, and strip out the header and footer rows? Another option, which I've used before but am not particularly fond of, is to insert each record from the source files into a single column table. From there, I can select the records not beginning with 'header%' or 'footer%' and doing a bunch of substrings() on the remaining records to pull out the values I'm concerned about and insert them to the destination table.Note: Combined, the files contain about 30K records, daily.Any thoughts or suggestions?Thanks,Bob |
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2006-03-06 : 17:41:21
|
It depends on what you're more comfortable with, but I would write some sort of cleaning/merging mechanism in vbscript or something similar before I loaded the files into the tables |
 |
|
|
|
|