Hallo.

statt :
SELECT * FROM DATEI WHERE F1 = 'W1' and F2 = 'W2' and
F3 = 'W3' and dec(digits(substr(F4, 1, 7)), 7, 0)
not between
1 and 9999999

vielleicht so (ohne digits ...)
SELECT * FROM DATEI WHERE F1 = 'W1' and F2 = 'W2' and
F3 = 'W3' and dec(substr(F4, 1, 7), 7, 0)
not between
1 and 9999999

Gruß,
Ralf