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

Home -> Community -> Usenet -> c.d.o.misc -> Re: trim off space

Re: trim off space

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Thu, 16 May 2002 18:02:37 GMT
Message-ID: <3CE3F438.B615C51C@exesolutions.com>


Ed Wong wrote:

> I have a varchar2 column stores data like this '12 3142','1233
> 412','133 233'. I like to get the first number before the space. ie.
> '12', '1233', '133'. This means anything after space need to be cut
> off. I look into the rtrim function but it doesn't do this for me.
> Can you help?
>
> Thanks,
> ewong

SELECT SUBSTRr('123 456', 1, INSTR('123 456', ' ')) FROM dual;

Daniel Morgan Received on Thu May 16 2002 - 13:02:37 CDT

Original text of this message

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