I have a field (column in Oracle) called X that has values like "a1b2c3", "abc", "1ab", "123", "156"
I wrote a sql query that returns only the X that holds pure numerical values with no letters; from the example above would be 123 and 156.
Query written using Oracle syntax:
select X from where REGEXP_LIKE(X, '^[[:digit:]]+$')
Result:
123, 156
Additionally I need to write a query to get the value between 100 and 150.
How could I write such a query in Oracle? Something like below:
select X from where REGEXP_LIKE(X, '^[[:digit:]]+$') between 100 and 150