IF EMPTY(m.id) OR ISNULL(m.id) OR NOT LEN(CHRTRAN(m.id," ",""))=8>
BETWEEN(m.id,VAL(CHR(48)),VAL(CHR(57)))If m.id is character the above will generate an "operator/operand mismatch" error. However, BETWEEN(m.id, '0', '9') works fine. There's also the ISDIGIT() function to test if a particular character is numeric or not in a string.