Hi,
We have requirement that in one of the field we will get double quotes we need to convert each double quote into two double quotes.
Ex:
Input value: raj"esh"ran"ja
Output should be: raj""esh""ran""ja
Is there any possibility to convert single double quote into two double quotes for n number of occurances please.
Thanks,
skp.
How to convert quote into double quote
Moderators: chulett, rschirm, roy
Did you try using the EReplace function?
Also if you are writing to a text file, then you could use a Sequential File stage in a Server job or Server Shared Container within a Parallel job. It should do the double quote handling you described.
Also if you are writing to a text file, then you could use a Sequential File stage in a Server job or Server Shared Container within a Parallel job. It should do the double quote handling you described.
Choose a job you love, and you will never have to work a day in your life. - Confucius
EReplace was added to the Parallel world in the 9.1 release, I do believe. So you could use a Server job (is it doing anything that requires PX?) or perhaps use a BASIC Transformer. Or you could find the C++ version called pxEReplace that users put together and posted here, give that one a shot although from what I recall reading it may have some... issues.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Or you could use a loop in a Transformer stage, WHILE Index(InLink.TheField, '"', 1) > 0
Within the loop replace the double quote using substring techniques.
Perhaps make use of the LastRecordInGroup() function to constrain the output.
Within the loop replace the double quote using substring techniques.
Perhaps make use of the LastRecordInGroup() function to constrain the output.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
you can try my solution explained in the post -
viewtopic.php?t=152903
viewtopic.php?t=152903