开发者

Characters to use for \r\n when inserting into SQL Server

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'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜