I have a table with a column whose data type is VARCHAR2(7 Char). The data in this column has values such as 1006,1007,2002 etc
I would like a regular expression that matches 4002,4003,4005,4011,4013 but NOT 4001.
First i tried using To_number(columnName) > 4001
but got an ORA-01722 invalid number error.
I have then tried using Regexp_like
unsuccessfully for this. I tried:
1. 40[02,03,05,11,13]
2. 40[0,1][^01]
3. 40[0,1]([2,3,5,11])
Any help would be appreciated!
cheers
number
? You should be using the correct data type. You've given some values that should and shouldn't natch but not a general rule. Your attempts suggest it has to start with 40, but what about 4020, or 4099, or any other number you haven't shown? – Alex Poolecol in ('4002','4003','4005','4011','4013')
? – trincot