Re: how to allow only alphabets in text item?

From: Connor McDonald <mcdonald.connor.cs_at_bhp.com.au>
Date: Thu, 18 Mar 1999 16:03:08 +0800
Message-ID: <36F0B33C.362F_at_bhp.com.au>


Brandon Lee wrote:
>
> hi anyone,
> how to allow only alphabets to be entered into text-item? Is there a
> format mask or you have to filter using trigger?

I don't know of a format mask as such...

you could always code:

declare
  lower_limit number := ascii('A');
  upper_limit number := ascii('Z');
begin
  for i in 1 .. length(:item) loop
    if upper(substr(:item,i,1)) not

        between lower_limit and upper_limit then
           raise_whatever_error_you_want;
    end if;
  end loop;
end;
-- 
==============================================
Connor McDonald
BHP Information Technology
Perth, Western Australia
"Never wrestle a pig - you both get dirty and the pig likes it..."
Received on Thu Mar 18 1999 - 09:03:08 CET

Original text of this message