• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 528
  • Last Modified:

Wild card in Sql for Oracle

Is there a wild card that can be used to specify only numeric filter for Oracle
0
TG_Sekhar
Asked:
TG_Sekhar
3 Solutions
 
teebonCommented:
Hi,

You can use a query like this:

SELECT * FROM TABLE_A WHERE
LENGTH(TRIM(TRANSLATE(COLUMN_A, ' +-.0123456789',' '))) IS NULL;

http://www.techonthenet.com/oracle/questions/isnumeric.php
0
 
sureshchsahuCommented:
Below is the small example for the question you have asked for:

with t as (select 'FREDBLOGGS' as txt from dual union all
           select 'JOE123BLOGGS' from dual)
-- END OF TEST DATA
select txt, length(txt) , length(translate(txt,'a0123456789','a') )
from t
where length(txt)  length(translate(txt,'a0123456789','a') )

0
 
awking00Commented:
What version of Oracle? In 10g and later, you can use regular expressions. Also, can you provide some sample data and what you would want to be returned?
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now