Bulk insert, SQL Server 2000, unix linebreaks

I felt compelled to contribute as I was having the same issue, and I need to read 2 UNIX files from SAP at least a couple of times a day. Therefore, instead of using unix2dos, I needed something with less manual intervention and more automatic via programming.

As noted, the Char(10) works within the sql string. I didn’t want to use an sql string, and so I used ””+Char(10)+””, but for some reason, this didn’t compile.

What did work very slick was: with (ROWTERMINATOR = ‘0x0a’)

Problem solved with Hex!

Leave a Comment

tech