Home » SQL & PL/SQL » SQL & PL/SQL » ReplaceSTR (10.2.0.4.0)
ReplaceSTR [message #529055] Fri, 28 October 2011 08:56 Go to next message
pratik4891
Messages: 73
Registered: February 2011
Member
Hello Guys

Can you please help me with the below question

I want to replace all the characters in a string with A and all the numbers with 0 with either replacestr or decode function in oracle

I/p

suman3123123pillai


O/p

aaaaa0000000aaaaaa



Thanks a lot!!!!!!!
Re: ReplaceSTR [message #529056 is a reply to message #529055] Fri, 28 October 2011 09:03 Go to previous messageGo to next message
Roachcoach
Messages: 1576
Registered: May 2010
Location: UK
Senior Member
Why those functions? Are you definitely limited to them? I've never seen replacestr in oracle.

Translate would be what I'd use
Re: ReplaceSTR [message #529057 is a reply to message #529055] Fri, 28 October 2011 09:10 Go to previous messageGo to next message
Michel Cadot
Messages: 68767
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Use TRANSLATE.

Regards
Michel
Re: ReplaceSTR [message #529302 is a reply to message #529057] Mon, 31 October 2011 00:29 Go to previous messageGo to next message
pratik4891
Messages: 73
Registered: February 2011
Member
Guys ,thanks for your reply but yes I am limited to these function because I have to used this functionality in informatica where translate function is not available
Re: ReplaceSTR [message #529304 is a reply to message #529302] Mon, 31 October 2011 00:59 Go to previous messageGo to next message
Littlefoot
Messages: 21826
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
But, why do you ask for help on an Oracle forum, then? Wouldn't you get a more accurate answer on an Informatica forum?
Re: ReplaceSTR [message #529311 is a reply to message #529302] Mon, 31 October 2011 02:13 Go to previous messageGo to next message
Michel Cadot
Messages: 68767
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
I am limited to these function because I have to used this functionality in informatica


http://www.google.com/search?hl=en&source=hp&q=informatica+oracle+translate

Regards
Michel
Re: ReplaceSTR [message #529342 is a reply to message #529311] Mon, 31 October 2011 04:08 Go to previous messageGo to next message
pratik4891
Messages: 73
Registered: February 2011
Member
You guys are correct ,its not the appropriate forum to ask the question
Re: ReplaceSTR [message #529357 is a reply to message #529342] Mon, 31 October 2011 05:21 Go to previous message
Michel Cadot
Messages: 68767
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
But you have the answer in the link I provided.

Regards
Michel
Previous Topic: compilation error
Next Topic: Decode Function
Goto Forum:
  


Current Time: Tue Sep 02 00:15:36 CDT 2025