Concatenating 'carriage return' (linefeed)

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
seell
Participant
Posts: 22
Joined: Fri Nov 07, 2003 9:46 pm

Concatenating 'carriage return' (linefeed)

Post by seell »

Input : Oracle
Output : Oracle

I have 5 input structured address fields (Block-House-No, Street Name, Building Name, Floor No, Unit No). These fields are to be concatenated into a single output address field but with multiple lines : (Line 1 : Block-house-no, Floor No and Unit NO; [linefeed] line 2 with Street Name [linefeed] and line 3 with Building Name)

How do I create the 'carriage return' (linefeed) for the output field ?

Thank you
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

Use char(10) in a transformer. Eg. input.col1 : char(10) : input.col2
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
Just wanted to point out that Vincent only mentioned the Line Feed part, If you need to plant CRLF the use Char(13) : Char(10)
Unix line termination is LF and windows is CRLF, so if it's to be displayed in a PC client while read from the Oracle DB you need to imbed CRLF.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Post Reply