Counter of Festivals

Ashok Blog for SQL Learners and Beginners and Experts

Wednesday 8 January 2020

Fix issues of line split from SQL to Excel while copy and paste

---------------------------------Fix issues of line split from SQL to Excel while copy and paste

SELECT replace(replace(columnwhichhaveissueswhilecopy, char(10), ''), char(13), '')
FROM [dbname].[dbo].[tablename]

Ref:
https://www.mssqltips.com/sqlservertip/3416/line-split-issues-when-copying-data-from-sql-server-to-excel/