Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: trim off space
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
![]() |
![]() |