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

Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL

Re: PL/SQL

From: Stephan Born <stephan.born_at_beusen.de>
Date: 2000/03/03
Message-ID: <38BF773E.9578C0C3@beusen.de>#1/1

> Hello,
> we are working with a database in oracle 8i.
> In a field which is defined as varchar2 are values like '01004578' and
> values with an alphabetical
> sign in it like '0100K124'. Is there a way to select all fields which have
> an alphabetical sign in it?

select *
from table
where translate (col, 'a1234567890', 'a') is not null;

Translate should convert all numerical characters into ''. If there are only numerical characters
in the column then the result will be NULL, otherwise NOT NULL.

Regards, Stephan

--
---------------------------------------------------------------
Dipl.-Inf. (FH) Stephan Born   | beusen Consulting GmbH
fon: +49 30 549932-0           | Landsberger Allee 392
fax: +49 30 549932-21          | 12681 Berlin
mailto:stephan.born_at_beusen.de  | Germany
---------------------------------------------------------------
       PGP-Key verfügbar       |      PGP-Key available
---------------------------------------------------------------
Received on Fri Mar 03 2000 - 00:00:00 CST

Original text of this message

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