For e.g: I have a column named "Card No", its a varchar but majority of the rows contain numbers and few contains alphanumeric numbers. I want to ignore all the records that are not numbers.
Below are a few examples for the same:
Select CardNo from XX;
Result:
CardNo:
_______
1234,
5467,
1234/5467,
abc 667,
efg428
In the above result set, I want to eliminate the last three values. Please advise.
Oracle 10+ has a regular expression system that you could use. Just so you know, no indexes can or will be used for this type of comparison. Oracle will need to look at every single row.
Take a look at http://docs.oracle.com/cd/B12037_01/server.101/b10759/functions114.htm#SQLRF06300
Something like: