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: PL/SQL substr(instr oracle

Re: PL/SQL substr(instr oracle

From: Brian Peasland <oracle_dba_at_remove_spam.peasland.com>
Date: Wed, 18 Jun 2003 14:50:35 GMT
Message-ID: <3EF07C3B.886445A9@remove_spam.peasland.com>


That's pretty much what I figured out too.

YC_CHOICE_IS_MY_CHOICE ==> YC_CIMC This is the first characters up to the first underscore, and then the first character of every component between the underscores till the end of the string.

I'm not sure why one would want to do this though...

Cheers,
Brian

Eric Parker wrote:
>
> "Daniel Morgan" <damorgan_at_exxesolutions.com> wrote in message
> news:3EEF937D.CAB015BD_at_exxesolutions.com...
> > Brian Peasland wrote:
> >
> > > You probably won't be able to do this in a simple SQL statement. Most
> > > likely, you'll have to use some PL/SQL and loop through the string and
> > > parse it as you go.
> > >
> > > Cheers,
> > > Brian
> > >
> > > Pal wrote:
> > > >
> > > > Hi
> > > >
> > > > can some one help to write a sql where I can extract string from the
> > > > field like this
> > > >
> > > > YC_CHOICE_IS_MY_CHOICE
> > > >
> > > > YC_CIMC
> > > >
> > > > SP_786_at_YAHOO.COM
> > > >
> > > > THANK YOU IN ADVANCE
> > >
> > > --
> > > ===================================================================
> > >
> > > Brian Peasland
> > > oracle_dba_at_remove_spam.peasland.com
> > >
> > > Remove the "remove_spam." from the email address to email me.
> > >
> > > "I can give it to you cheap, quick, and good. Now pick two out of
> > > the three"
> >
> > If by your answer you are indicating that you understand what the OP was
> > asking I would very much like to know what it is?
> >
> > Thanks.
> > --
> > Daniel Morgan
> > http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
> > damorgan_at_x.washington.edu
> > (replace 'x' with a 'u' to reply)
> >
> >
>
> Daniel
>
> The OP's spec is far from clear.
> I'd decided that what was required was
> The 1st characters up to and including the 1st underscore.
> Followed by each character preceded by an underscore.
>
> I think it works for the OP's case but if it's what he wants in general...
>
> Regards
>
> eric

-- 
===================================================================

Brian Peasland
oracle_dba_at_remove_spam.peasland.com

Remove the "remove_spam." from the email address to email me.


"I can give it to you cheap, quick, and good. Now pick two out of
 the three"
Received on Wed Jun 18 2003 - 09:50:35 CDT

Original text of this message

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