Hi folks,
I was working on a report that required the output to club 2 columns but separate them with a carriage return.
Following query shows, how it was achieved:
Here I wanted the column line 1, 2 to be separated by a comma i.e. ","
I wanted the column SUBURB to be listed in NEXT LINE.
To achieve Carriage Return , I used:
I was working on a report that required the output to club 2 columns but separate them with a carriage return.
Following query shows, how it was achieved:
SELECT ad.line1 || ', ' || ad.line2 || ', ' || CHR(13) || CHR(10) || ad.SUBURB || ', ' || ad.STATE_CODE || ', ' || ad.pcode MAIL_ADD FROM addresses ad
Here I wanted the column line 1, 2 to be separated by a comma i.e. ","
I wanted the column SUBURB to be listed in NEXT LINE.
To achieve Carriage Return , I used:
CHR(13) || CHR(10) ||
NOTE
The output in an IDE will not show the data in next line.
But in an actual report or your application the data will be listed in next line as per your querys logic.
The output in an IDE will not show the data in next line.
But in an actual report or your application the data will be listed in next line as per your querys logic.
No comments:
Post a Comment