Re: PL/SQL Problem
From: Srinivasa Kunamneni <eleeb02_at_menudo.uh.edu>
Date: 1996/05/25
Message-ID: <4o75lo$sr9_at_masala.cc.uh.edu>#1/1
Date: 1996/05/25
Message-ID: <4o75lo$sr9_at_masala.cc.uh.edu>#1/1
gwen jenkins () wrote:
: I am using Oracle 6 in Unisys 6000 unix machine. Now, I am writing the application that
: need to check the char field which is numeric or character.
: char field is numeric ==> contains 0 - 9 and space
: char field is character ==> contains a-z, A-Z and space
: Would you tell me how to code it in PL/SQL?
I assumed your char field width is 4.
Numeric:
Select field_name from table_name
where replace(file_name,' ') between '0000' and '9999'
Character:
Select field_name from table_name
where (replace(field_name,' ') < '0000'
or replace(field_name,' ') > '9999' );
However, if you don't treat space as numeric , you can take replace function from the query. Received on Sat May 25 1996 - 00:00:00 CEST