I'm running IB2009 and I'm trying to count the number of records where a specific field is neither NULL nor empty:
SELECT COUNT(A.ID) FROM MYVIEW A
WHERE ((A.VARCHARFIELD1 IS NOT NULL) OR (A.VARCHARFIELD1 <> ''))
where MYVIEW is a VIEW, and MYVIEW.ID is an INTEGER, while MYVIEW.VARCHARFIELD1 is a VARCHAR(18).
I'm getting the error message
Error at line 1, conversion error from string ""
which I don't really understand, since when I drop the COUNT()-function, the query executes nicely. Do anyone know what I'm doing wrong? Thanks!