-840 TOO MANY ITEMS RETURNED IN A SELECT, INSERT LIST, FROM MERGE, OR FROM UNNEST
Explanation
The number of items returned in the SELECT list, specified in an INSERT list, specified in a MERGE statement, or returned from an invocation of UNNEST exceeds the allowable maximum of 750.
System action
The statement cannot be processed.
Programmer response
Determine whether all the information is actually needed. For example, the number of items that are returned by the SQL statement SELECT * FROM A, B, C is the sum of the number of columns in all three tables. Not all column data might be needed.
Rewrite the SQL statement so that only the necessary items of information are returned, or break the SQL statement into two or more statements.
SQLSTATE
54004