I am trying to perform a bulk insert on pipe delimited file (approx 25 columns,5000+ rows of data).
Normally this is no problem however this file has a header and trailer record with no delimiters (1 column).
I could use a utility like grep to remove the header/trailer record but I would like to capture the entire file inside sql server.
I can bulk insert the entire file into a single column (wide) that would include the delimiters.
My problem from there is to process the single column data into the appropriate rows /columns.
I am looking for a set solution as opposed to a cursor type solution. HTML?
Seems slow. Cross Apply?
Changing the file format is not a viable solution.
I’m likely to have more than a few of these oddball formats with a variable number of columns.
I thank you for your time on this puzzle.
View Complete Post