I have an Import/Export routine that grabs a .txt file and pulls it into a buffer table in my SQLServer 2005. The .txt file is fairly straight forward except for one anomaly.
This is an order file given to me from a large e-commerce company, so to begin...there is nothing I can do to change the way I'm getting the data. A specific type of record that they send through on the file has the row delimiter (CR/LF) at the end of column #65 but the rest of the file goes to 73 columns. So it looks like this:
Because there are not column delimiters<tab> to fill out the rest of the rows, the data in the row immediately following the anomaly row gets messed up.
Can anyone think of a way to get the data to flow in smoothly, so the Import/Export setup knows to always start a new row at the CR/LF. In the Source data setup, {CR}{LF} is CLEARLY chosen as the Row delimiter.
i think best thing would be to use ssis package and parse data file using script task and insert the missing tabs in cases column dont exists (anamoly rows). then giving it to normal data flow task should run export smoothly
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
Thanks visakh16. I think I'm officially out of my league on your suggestion as I have no experience writing a custom script to parse the data. I do know a pretty good programmer/developer locally and I'll see if he can help me get in the right direction.