If sql FETCH gives back SQLSTATE 22002 "A null value, or the absence of an indicator parameter was detected; for example, the null value cannot be assigned to a variable, because no indicator variable is specified."
Reason may be, that some column in SQL query contain null value.

