I am trying to import data from a text file whose rows are delimited by a newline character (with no preceding carriage return). Specifying ROWTERMINATOR = '\n' to BULK INSERT doesn't work unless I have a carriage return preceding each newline. BOL states (under BCP):
How do I force it to look for \n only?
I'm assuming that it must apply a similar principle with BULK INSERT - i.e. \n implies \r\n.A common row terminator used when exporting SQL Server data to ASCII data files is \r\n (carriage return, newline). Using both characters as the row terminator ensures that each row of data appears on its own line in the data file. However, it is only necessary to enter the characters \r\n as the terminator when manually editing the terminator column of a bcp format file. When you use bcp interactively and specify \n (newline) as the row terminator, bcp prefixes the \r (carriage return) character automatically.
How do I force it to look for \n only?