I have a column which is of type nvarchar(max). I am trying to get this data moved to a text file using BCP option.
The values in the column should be enclosed in double quotes, while generating the data out , additional whitespaces , LR should also be removed.
I have tried adding quotename(column_name,"") , but this gives me a NULL value.
Tried this, but not working : QUOTENAME(REPLACE(LTRIM(RTRIM(column_name)),CHAR(10), ''),"")
Example: The output should be like : "This is a test data "
How to fix this ?