Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Trimming SQL
If your numbers are fixed at 4 characters, (as in your example) then how
about:
UPDATE table
SET col1 = SUBSTR(col1,5)
If not, then try:
UPDATE table
SET col1 = SUBSTR(col1, INSTR(col1,' ')+1)
Anne Crowther
--
Chris Forlano <cforlano_at_nortelnetworks.com> wrote in message
news:37E8BE2E.33D390EB_at_nortelnetworks.com...
> Looking for and update statement that can trim the following:
>
> col1
> -----
> '0001 text1'
> '0002 text2'
> '0003 text3'
>
> ... into this ...
>
> col1
> -----
> 'text1'
> 'text2'
> 'text3'
>
> Essentially, remove all text preceding the first space.
>
> Thanks,
>
> Chris
>
> --
> Chris Forlano
> TMS Project Manager
> Nortel Networks, Maidenhead
> 590 4342 (01628 434 342)
> cforlano_at_nortelnetworks.com
>
>
Received on Wed Sep 22 1999 - 07:08:37 CDT
![]() |
![]() |