Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

[resolved] Preserve Carriage Returns From SQL Column Input

I have a SQL column (memo field) which contains carriage returns. How can I preserve the carriage returns in my Excel file output throigh tMap ?
Example :
Input :
TEXT LINE  1
TEXT LINE 2
Should output to 
TEXT LINE 1\n TEXT LINE 2\n
How do I make sure code checks for each available carriage return, so it doesn't stop on line 1 ?

Labels (2)
1 Solution

Accepted Solutions
_AnonymousUser
Specialist III
Specialist III
Author

Hi,

I solved this by adapting the input query.

Replace (CONVERT(VARCHAR(MAX), dbo.TABLE.COLUMN_NAME) , CHAR(10), '\\n') AS COLUMN_NAME_CLEAN

View solution in original post

3 Replies
Anonymous
Not applicable

Hi,
Do you want to get full row from your output?
Best regards
Sabrina
_AnonymousUser
Specialist III
Specialist III
Author

Hi,

I solved this by adapting the input query.

Replace (CONVERT(VARCHAR(MAX), dbo.TABLE.COLUMN_NAME) , CHAR(10), '\\n') AS COLUMN_NAME_CLEAN
Anonymous
Not applicable

Hi,
eplace (CONVERT(VARCHAR(MAX), dbo.TABLE.COLUMN_NAME) , CHAR(10), '\\n') AS COLUMN_NAME_CLEAN

Great that you have fixed this issue by yourself. Thanks for your prompt reply and sharing your solution with us.
Best regards
Sabrina