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: select where for a specific pattern

Re: select where for a specific pattern

From: LHradowy <lhradowy_at_gmail.com>
Date: 10 Jul 2006 07:07:32 -0700
Message-ID: <1152540452.910604.107170@h48g2000cwc.googlegroups.com>

Anurag Varma wrote:
> LHradowy wrote:
> > I have a column that I need to select on:
> > Data looks like:
> > 01 002 120
> > 01 002 160
> > 01 005 120
> > 01 002 125
> > 01 1 00 02 1
> > 01 2 00 02 3
> > 01 2 03 02 3
> > 01 042 160
> > 01 2 06 02 3
> > 01 202 167
> > etc.
> >
> > I need to only pull this type of format:
> > ## ### ###
> >
> > select col1 from table1 where col1 like??
> >
> > Next question:
> > How to update, this type of format:
> > ## ### ###
> >
> > To this type of format:
> > ## # ## ## #
>
> What oracle version?
> What have you tried so far?
>
> Anurag

I have been able to parse the data as I want it to look but do not know how to update them now.

select tn,oe "oe",substr(oe,1,2)||' '||substr(oe,4,1)||' '|| substr(oe,5,2)||' '||substr(oe,8,2)||' '||substr(oe,10,1) "formatted oe"
from vt_mlr
where oe like '__ ___ ___'
and BLD ='WNPGBLD'
; Received on Mon Jul 10 2006 - 09:07:32 CDT

Original text of this message

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