I have table 'A' with column 'col' with values:
a.b.1.c
a.b.2.c
a.b.26.d
If I execute this Select it works:
SELECT
*
FROM
A
WHERE col LIKE 'a.b.[2-9]%';
If I execute this one, it does'nt:
SELECT
*
FROM
A
WHERE col LIKE 'a.b.[2-9][0-9]*%';
The expected result of the query should be:
a.b.2.c
a.b.26.d
So, I need the "*" to be optional the second number
Why is this happening? How could I make it work to allow numbers greater than 9?
*is the culprit in the second one.[0-9]is optional and you require the results to includea.b.2.c, then what's wrong with your first statement ? Just curious to know :)