Saturday, 6 December 2014

Replace a newline in TSQL

In Case we import data from MSSQL or MYSQL to excel sheet or flat file, new line create a problem, like that single row data split into another another row.
Via this query we can get freedom to newline issue.

SELECT replace(replace([field],char(10),' '),char(13),' ') FROM [table]

No comments:

Post a Comment