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: An urgent Sql question Please help !

Re: An urgent Sql question Please help !

From: kwlim <keith_lim_at_usa.net>
Date: Thu, 29 Oct 1998 15:51:25 -0800
Message-ID: <3638FF7C.86D92EFA@usa.net>


Try Translate the characters to space then ltrim and rtrim them. Eg.
select ltrim(rtrim(translate(upper(col),'ABCDEFGHIJKLMNOPQRSTUVWXYZ',' '))) from table

Keith Lim

MUJAHID HAMID wrote:

> 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 29 1998 - 17:51:25 CST

Original text of this message

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