New Line Issue when copying data from SQL Server 2012 to Excel

My best guess is that this is not a bug, but a feature of Sql 2012. 😉
In other contexts, you’d be happy to retain your cr-lf’s, like when copying a big chunk of text. It’s just that it doesn’t work well in your situation.

You could always strip them out in your select. This would make your query for as you intend in both versions:

select REPLACE(col, CHAR(13) + CHAR(10), ', ') from table

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)