Quantcast
Channel: Answers by "Kevin Feasel"
Viewing all articles
Browse latest Browse all 15

Answer by Kevin Feasel

$
0
0
Using SSIS, this isn't too difficult, but it is perhaps most easily solved using a Script transform. There are [a few][1] [how-tos][2] online which should give you a pretty good idea of how to solve your particular problem. In your case, if your real data looks like the mocked-up data that you have, you might be able to look where the first three characters = HDR and the right-trimmed length is no more than X (where X is the largest header length you can expect, but smaller than the smallest detail length you can expect). The two links show two somewhat different methods for processing the file, but the end result for both is two separate flows: a header flow which has the date and store key, and a detail flow which has the store key and store-related facts. [1]: http://www.sqlis.com/sqlis/post/Handling-different-row-types-in-the-same-file.aspx [2]: http://www.blue-chip.com.au/ssis-file-with-header-detail-trailer.aspx

Viewing all articles
Browse latest Browse all 15

Latest Images

Trending Articles





Latest Images