Quote char handling

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
mrvsr
Premium Member
Premium Member
Posts: 40
Joined: Fri Aug 03, 2007 8:33 am

Quote char handling

Post by mrvsr »

Hi,

How can assign 'rama's' to a variable in transformation derivation. I tried 'rams\'s' etc.,

Thanks
Thanks
MRVSR
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Try giving "rama's"
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
mrvsr
Premium Member
Premium Member
Posts: 40
Joined: Fri Aug 03, 2007 8:33 am

Handling quotes and special characters

Post by mrvsr »

I have both quotes ' " in the value sting. ex: ' "&fieldname#1"="rama's" ' Please let me know how to handle these quotes and special characters.
Thanks
MRVSR
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Re: Handling quotes and special characters

Post by sud »

Simple assignment should not be a problem. You can create stage variables as sQuote = "'" and dQuote = '"' and use them to concatenate wherever necessary.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Backslash may also work as a quote character. It does in server jobs. Try it and let us know.

Code: Select all

\"&fieldname#1"="rama's"\
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply