Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: How can I find a space in a text string
how about this:
select substr('VISA 123456789',1,(instr('VISA 123456789',' ')-1)) from dual;
of course replace the hard coded string with your variable(in both places) and replace dual with a table name.
have a good time.
joe
Helmut Daiminger wrote:
>
> Hi all!
>
> How can I find the first blank space in a given text string?
>
> E.g.: "VISA 123456789"
>
> I want to find the first blank (space) in the text string and then cut out
> the left part of the string (in the example: VISA).
>
> How do I do that?
>
> Thanks,
> Helmut
>
> --
> Author: Helmut Daiminger
> INET: hdaiminger_at_vivonet.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
-- Joe Testa http://www.oracle-dba.com Oracle 8i documentation online http://www.oracle-dba.com/oracle-docsReceived on Fri Aug 18 2000 - 19:50:45 CDT