Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: String manipulations

Re: String manipulations

From: <sybrandb_at_hccnet.nl>
Date: Tue, 27 Mar 2007 20:02:55 +0200
Message-ID: <r1ni03df0seh8kk5dcbese1gp676k86k4e@4ax.com>


On Tue, 27 Mar 2007 19:54:22 +0200, "Michel Cadot" <micadot{at}altern{dot}org> wrote:

>
>"nirav" <shivam71_at_gmail.com> a écrit dans le message de news: 1175017055.361915.129110_at_o5g2000hsb.googlegroups.com...
>|I have a need to modify data in a table....the data is varchar ...here
>| are its details:
>| SQL> desc ns
>| Name Null? Type
>| ----------------------------------------------------- --------
>| ------------------------------------
>| ACTY
>| VARCHAR2(800)
>|
>| SQL> select * from ns;
>|
>| ACTY
>| ----------------------------------------------------------------------------------------------------
>| Mohan (x,y,z) went to see Joe
>| Mohan(xxxx,yy,z) was worried, Joel called and Mohan (x,yyy,zz)
>| responded to her
>| Mohan(x,y,zzzz) was glad, party was all set, Mohan (xx,yy,z) called
>| all his friends but Mohan(x,y,z) did not call Mona
>|
>|
>| How should it be modifed? - I have to add the string '~,' after the
>| second comma after the opening bracket that follows the word Mohan.
>|
>| so expected result is:
>| Mohan (x,y,~,z) went to see Joe
>| Mohan(xxxx,yy,~,z) was worried, Joel called and Mohan (x,yyy,~,zz)
>| responded to her
>| Mohan(x,y,~,zzzz) was glad, party was all set, Mohan (xx,yy,~,z)
>| called all his friends but Mohan(x,y,~,z) did not call Mona
>|
>| Can this be done via sql? I know pl/sql will solve it , and its not
>| too tough to work out that way, but can a purely sql based solution
>| meet this need?
>|
>| Thanks!
>| Nirav
>|
>
>Yes it can. :)
>
>Regards
>Michel Cadot
>

I love this answer!

Sybrand Bakker
Senior Oracle DBA Received on Tue Mar 27 2007 - 13:02:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US