Member_2_3698648
asked on
SSIS - Get last line in a flat file
Hi Experts ,
I need to process a file and get the last record and then process it. The last line is like a footer record which i need to match with the rest of the file. I'm just trying to get a handle on the best way to do this,
I thought of storing the information in a record set destination etc, or maybe something similar,
Potentially SSIS might not even be the best tool for the job in this case, maybe a script task instead might be worthwhile.
I need to process a file and get the last record and then process it. The last line is like a footer record which i need to match with the rest of the file. I'm just trying to get a handle on the best way to do this,
I thought of storing the information in a record set destination etc, or maybe something similar,
Potentially SSIS might not even be the best tool for the job in this case, maybe a script task instead might be worthwhile.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for these solutions, i will trial each, however i think Jared_S suggested solution might work well,
I think Valentino_V is good, unfortunately, at this point i don't need to process the records in the file, and the associated links are a little overkill (but very interesting reading!) for what i need here.
I think Valentino_V is good, unfortunately, at this point i don't need to process the records in the file, and the associated links are a little overkill (but very interesting reading!) for what i need here.
If the last row cannot be distinguished, have a look at this method: http://microsoft-ssis.blogspot.com/2011/02/how-to-skip-trailer-records.html
(found through http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/8454da9c-4ed1-4020-bcae-d00e60a8f1b9/)