Scenario:
Value Result
12345 Number
12Z3A Alpha Numeric
Simple Query:
select '12345' input,
DECODE( TRANSLATE('12345','0123456789',' '), NULL, 'Number','Alpha Numeric') Result
from dual
select '12Z3A' input,
DECODE( TRANSLATE('12Z3A','0123456789',' '), NULL, 'Number','Alpha Numeric') Result
from dual;
Value Result
12345 Number
12Z3A Alpha Numeric
Simple Query:
select '12345' input,
DECODE( TRANSLATE('12345','0123456789',' '), NULL, 'Number','Alpha Numeric') Result
from dual
select '12Z3A' input,
DECODE( TRANSLATE('12Z3A','0123456789',' '), NULL, 'Number','Alpha Numeric') Result
from dual;
No comments:
Post a Comment