Home » SQL & PL/SQL » SQL & PL/SQL » help in String manipulation (oracle 10 g)
help in String manipulation [message #376767] Thu, 18 December 2008 09:05 Go to next message
kanis
Messages: 61
Registered: November 2006
Member
I am using oracle 10g.
I have two string like
str1 varchar2(100):= '/a[1]/b[1]/c[2]/d[1]';
str2 varchar2(100):='/a/b/f/g';

I need a output string like '/a[1]/b[1]/f/g'.
Please help me how simply I can do it ?
Re: help in String manipulation [message #376769 is a reply to message #376767] Thu, 18 December 2008 09:08 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
select '/a[1]/b[1]/f/g' from dual;

Regards
Michel
Re: help in String manipulation [message #376773 is a reply to message #376769] Thu, 18 December 2008 09:13 Go to previous messageGo to next message
kanis
Messages: 61
Registered: November 2006
Member
Hi Michel ,
I belive you have not got my problem .
Look the two input string
'/a[1]/b[1]/c[2]/d[1]'
'/a/b/f/g'

See "a" and "b" both are present in the both the string .
So I want those two character with [] to be relplace in str2.
Re: help in String manipulation [message #376774 is a reply to message #376773] Thu, 18 December 2008 09:15 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
I belive you have not got my problem .

You're wrong.

Quote:
See "a" and "b" both are present in the both the string .
So I want those two character with [] to be relplace in str2.

What are the complete specifications? The ones that can't lead to 2 different results with the same inputs?
What can be the inputs?
Can we have [99]? Can we have {1}? Can we have...?

Regards
Michel

[Updated on: Thu, 18 December 2008 09:16]

Report message to a moderator

Re: help in String manipulation [message #376900 is a reply to message #376769] Fri, 19 December 2008 01:17 Go to previous message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
excellent reply to op's qurry
Previous Topic: "view" data of last week,month,year
Next Topic: Query with Row Generator
Goto Forum:
  


Current Time: Fri Dec 09 23:27:59 CST 2016

Total time taken to generate the page: 0.08639 seconds