I'm attempting to insert some data from MySQL to SQL Server. I've dumped the M开发者_Python百科ySQL table to a text file as SQL insert statements. I can insert it into SQL Server ok but the carriage returns are inserting as \r\n rather than as control sequences. How can I replace the \r\n strings in the MySQL insert statements so that they will end up as carriage returns in SQL Server?
The only way I can think of is to replace \r\n
with ' + CHAR(13) + CHAR(10) + '
.
Just replace the \r\n escape sequence with a line break. Example:
select 'This is
a multi-line
string'
精彩评论