how to pass quotes single& double as argument to conver

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
sk39758
Participant
Posts: 17
Joined: Mon Mar 02, 2009 10:22 pm

how to pass quotes single& double as argument to conver

Post by sk39758 »

Hi ,


I want to pass " (double quote) and ' (single quote) as first argument to convert function.
Could some one tell me how to do that?
RAJARP
Participant
Posts: 147
Joined: Thu Dec 06, 2007 6:46 am
Location: Chennai

Post by RAJARP »

Hi,
For single quotes

convert( '<from character>',"<single quote within pair of double quotes>",link.field)

example :

i/p data==>raja*s
o/p required==>raja's

code:

Code: Select all

convert('*',"'",raja*s)
hope this will help.

Regards,
Raja R P
sk39758
Participant
Posts: 17
Joined: Mon Mar 02, 2009 10:22 pm

Post by sk39758 »

Hi ,

My input string contains double quote and single quote both and i want both to be removed.

input string -"india's"
output shud be indias
i wanna do this using convert function so my question is how to mention single and double quote in first agrument of convert function.
HariK
Participant
Posts: 68
Joined: Thu May 17, 2007 1:50 am

Post by HariK »

Convert('"','',Convert("'","",(yourstring)))
unless you want to accomplish the whole thing using only one instance of convert function.
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Code: Select all

Convert( "'" : '"',"",Input)
Convert( Char(047) : Char(042),"",Input)
You are the creator of your destiny - Swami Vivekananda
Post Reply