Possibly the word SELECT is misspelled in the report specification. If you intentionally wrote another SQL statement such as UPDATE or INSERT, remove it; only SELECT statements are permitted in reports. (You can execute other SQL statements in a C function that is called from a report. The ESQL/C manual discusses linking external C functions with reports.)