Strip double quotes at end of the record

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
kiran0435
Participant
Posts: 39
Joined: Sun Sep 26, 2010 10:28 pm

Strip double quotes at end of the record

Post by kiran0435 »

Hi,

I have my source record as

abc|"1234|"xyz|"1|"|"
xyz|"3244|"342|"|"|"

I have Strip |" at the end of each record.

How I can accomplish removing quote characters...

I tried with trim function and mentioned |" as delimiter field but it was not working...

Please help me in solving this.. Thanks in advance.......
ravireddy25
Participant
Posts: 59
Joined: Wed Dec 31, 2008 5:49 am

Post by ravireddy25 »

Hi,
As | is your delimiter, Try using Convert function (Trim(Convert('"','',colname)),hope it will solve the pbm.


Regards
Ravi
Ravi
kiran0435
Participant
Posts: 39
Joined: Sun Sep 26, 2010 10:28 pm

Post by kiran0435 »

my output should for the corresponding inputs should be

abc|"1234|"xyz|"1|"|" --- abc|"1234|"xyz|"1
xyz|"3244|"342|"|"|" --- xyz|"3244|"342
suse_dk
Participant
Posts: 93
Joined: Thu Aug 11, 2011 6:18 am
Location: Denmark

Post by suse_dk »

So... you only want to remove the double quote from "blank" fields?
_________________
- Susanne
kiran0435
Participant
Posts: 39
Joined: Sun Sep 26, 2010 10:28 pm

Post by kiran0435 »

only right side... empty fields needs to be trimmed
Post Reply