Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Need help on SQL
Sorry that was crap finger problems.
It should have been
use instr as in
substr(nom_concat,1,instr(nom_concat,',')) and substr(nom_concat,instr(nom_concat,',') + 1)
My apologies
-- Steve Rainbird Principal consultant MSS International Ltd. www.mssint.com "Steve Rainbird" <steve.rainbird_at_mssint.com> wrote in message news:...Received on Tue May 01 2001 - 14:30:05 CDT
> You can use instr as in
>
> substr(nom_concat,firstname',1,instr(nom_concat,firstname',',')) and
> substr(nom_concat,firstname',instr(nom_concat,firstname',',') + 1)
>
> --
> Steve Rainbird
> Principal consultant
> MSS International Ltd.
> www.mssint.com
>
> "Eric Pearson" <eric.pearson_at_ssss.gouv.qc.ca> wrote in message
> news:4vyH6.52$k95.20033_at_news20.bellglobal.com...
> > Hi, i have a field names nom_concat, in it I store the name of employes
in
> > this format: Pearson, Eric
> > it's varchar2(32)
> >
> > I would like to easily separate the first and last name so I can put
them in
> > two different field named first_name and last_name (both are
varchar2(15))
> >
> > I tried with LTRIM and RTRIM but it doesn't work the way I would like it
to.
> > Is there an SQL function that takes all the characters in a string until
it
> > meets a character that I give it i.e. a comma
> >
> > thanks
> >
> > Eric Pearson
> > eric.pearson_at_ssss.gouv.qc.ca
> >
> >
>
>
![]() |
![]() |