Create a gist now

Instantly share code, notes, and snippets.

Como saber si el valor de un campo es numerico en PL/SQL
-- Obtener todos los registros que son alfanumericos
select * from (
select '123' campo from dual
union all
select '1X2' from dual
) tmp
where translate(campo,'T 0123456789','T') is not null;
-- Obtener todos los registros que son numericos
select * from (
select '123' campo from dual
union all
select '1X2' from dual
) tmp
where translate(campo,'T 0123456789','T') is null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment