Re: Identifying alpha characters only - help

From: Paul Quenneville <paulq_nospam_at_rogers.com>
Date: Wed, 31 Jul 2002 21:15:17 GMT
Message-ID: <FrY19.121068$WsS.86144_at_news01.bloor.is.net.cable.rogers.com>


create or replace FUNCTION f_int( in_string varchar2)  return number
  is
  num_value number(8);
/* return numerical value of string equivalent */

   BEGIN
   select to_number(in_string)
   into num_value
    from sys.dual;
   return(num_value);
  exception when others then
  return(-1);
  END;
/

SELECT F_INT(your_column)
from your_table
where f_int(your_column) <> -1;

"Lakeuk" <djw_123m_at_hotmail.com> wrote in message news:bcdae9a0.0207310209.3db4eab2_at_posting.google.com...
> I have a list of values in a column of which I only want my results
> set to contain the records that match 3 alpha characters
>
> Value
> -----
> AAA
> 001
> 002
> AB
> A
> BBB
> BBB
>
> Using the data set above I want my query to only identify the
> following records
>
> Result
> ------
> AAA
> BBB
> BBB
>
> Has anyone got any ideas of what SQL I need to write to get the
> required result, I know I need to use the length function to match the
> 3 characters but I don't know how to identify alpha character only
> (non numeric)
>
> I'm using Oracle / PLSQL, note the above example is a small set of
> data
>
> Any help appreciated
> Thanks
>
> Dave
Received on Wed Jul 31 2002 - 23:15:17 CEST

Original text of this message