'How to add new line in SELECT Statement in netezza

FNAME   LNAME   TARGET
VANITA  MALGE   VANITA
MALGE

How do I concat two columns with new line in between in Netezza not SQL?



Solution 1:[1]

Use the CHR function, and get the argument value from https://www.asciitable.com/ depending on what you mean by ‘new line’. Unix/windows/Mac unfortunately has different definitions, but let’s go with the Unix style:

Select 
  FNAME, 
  LNAME, 
  FNAME||chr(10)||LNAME
FROM YOURTABLE

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Lars G Olsen