Hi,
I have a special case where I have to replace a word from a string with a mixed case string in a field, I know before hand what are the words that needs to be replaced with some special words.
I get a list of words from a Reference file as
OCONNELL=OConnell
LADISA=LaDisa
LADOUCEUR=LaDouceur
LADUCA=LaDuca
LADUCER=LaDucer
MCDONALD=McDonald
MCMILLER=McMiller
Etc...
When I get an input from the field as
123 Quality Drive MCDONALD Road CA USA
I should get the out put as
123 Quality Drive McDonald Road CA USA.
Any thoughts ?
Regards,
Shree
String Replace with Mixed Case
Moderators: chulett, rschirm, roy
String Replace with Mixed Case
Regards,
Shree
785-816-0728
Shree
785-816-0728
Re: String Replace with Mixed Case
Can there only be one single occurence of a word to be replaced, or could you have for example:
123 OCONNELL Drive MCDONALD Road CA USA
123 OCONNELL Drive MCDONALD Road CA USA
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
You have quite a few options
1.) Split each row into multiple lines with 2 extra columns - line number, column number. Then use individual search and join them back into one line.
2..) Formatting commands outside datastage with your parameter values (a=b) as referenced file
3.) Load your reference file in any dbms like Oracle and use regular expression string
Or use QualityStage
1.) Split each row into multiple lines with 2 extra columns - line number, column number. Then use individual search and join them back into one line.
2..) Formatting commands outside datastage with your parameter values (a=b) as referenced file
3.) Load your reference file in any dbms like Oracle and use regular expression string
Or use QualityStage