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

Home -> Community -> Usenet -> c.d.o.server -> Re: Trimming SQL

Re: Trimming SQL

From: Anne Crowther <anne.crowther_at_capgemini.co.uk>
Date: Wed, 22 Sep 1999 13:08:37 +0100
Message-ID: <7sags9$8pt$1@taliesin.netcom.net.uk>


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

Original text of this message

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