My actual requirement is as follows.

1. The field f1 is varchar(4)

2. I have to select the first character what ever it may be. It may be char or digit.

3. I have to select those records, where 2nd position to 4th position characters are number varying from 0 to 9.

Is it that you are suggesting the query like below..? Or any other way is there..?

SELECT COUNT(*)
FROM t1
WHERE SUBSTR(f1,2,1) BETWEEN '0' AND '9'
AND SUBSTR(f1,3,1) BETWEEN '0' AND '9'
AND SUBSTR(f1,4,1) BETWEEN '0' AND '9';