Last active
January 23, 2016 04:53
-
-
Save arbo-hacker/cae647d16ee8bda52928 to your computer and use it in GitHub Desktop.
Como saber si el valor de un campo es numerico en PL/SQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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