If the first character is any character, you don't need to worry about it. Primarily your objective is to ensure that the second character is a number and hence use substr -
SELECT COUNT(*)
FROM t1
WHERE SUBSTR(f1,2,1) BETWEEN 0 AND 9;
Yes, Oracle does not know about regular expressions.
Yes, this will work.
Yes, there is another way:
Code:
select count(*) from t1
where translate(substr(f1,2,3),'0123456789','9999999999')='999'
Tomaž "A common mistake that people make when trying to design something completely
foolproof is to underestimate the ingenuity of complete fools" - Douglas Adams
Bookmarks