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 |
Trudye
Posting Yak Master
169 Posts |
Posted - 2009-04-15 : 18:00:58
|
I am receiving 5 files that share identical fields in the hdr and trailer and simular detail fields. I need to validate the seq# and date on each hdr and rec count on each trl'r before I can process the dtl recs. This must be done for all 5 files text files.Do I have to use 5 different tasks to import these text files, validate the and save the hdr info, validate and save the trlr info, process the dtl and then start on the second file? Or is there another way?I hope that made sense. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-04-16 : 10:54:56
|
i think what you need is a script component & data flow task inside a for each loop. the script component checks header/trailer and data flow will do import based on script components result. the for each loop will loop over 5 files to do the processing on each |
 |
|
Trudye
Posting Yak Master
169 Posts |
Posted - 2009-04-18 : 13:45:32
|
Thanks Visakh16 for responding, sorry it took me soooo long to get back to you. I thought of that but would the For Each loop task read all the files and then process or would it read one file and process that file? Allowing me to validate the hdr/trl of the first file before it read the second file.Thanks again,Trudye |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-04-18 : 15:15:21
|
it will read file by file and do the tasks defined inside loop for each file |
 |
|
|
|
|