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: Remove charters from a cloumn help please !

Re: Remove charters from a cloumn help please !

From: mdr <resnimi_at_mail.northgrum.com>
Date: Fri, 23 Oct 1998 04:46:40 GMT
Message-ID: <01bdfe40$3ef445c0$bc08e484@bigrez.masdils>


You could use the TRANSLATE function.

Select
TRANSLATE(UPPER(col1),'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ','0123456789') FROM... To get only those with numbers, make your WHERE clause use the TRANSLATE function...

WHERE
col1=TRANSLATE(UPPER(col1),'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ','012345678 9');
mr

MUJAHID HAMID <mujahid_at_pharmco.demon.co.uk> wrote in article <909088663.2319.0.nnrp-05.c2de4f17_at_news.demon.co.uk>...
> Dear All.
>
> I want to remove characters from a column when I select from it but keep
> numbers from it
> e.g. Table1:
> col1
> ====
> 1234
> 123a
> 12b4
> ab34
> I would like to select all the rows from this table but with characters
> filtered out.
> I like to get the following result from the query
>
> col1
> ====
> 1234
> 123
> 124
> 34
>
> and if possible just select the rows with number only and no characters
in
> it.
>
> With Thanks in advance
>
> Mujahid_at_pharmco.demon.co.uk
>
Received on Thu Oct 22 1998 - 23:46:40 CDT

Original text of this message

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