Previous Topic: -30 - SQL IDENTIFIERS MAY NOT EXCEED 32 BYTES IN LENGTHNext Topic: -32 - STATEMENT IS TOO LARGE TO COMPILE


-31 - CANNOT REFERENCE A VIEW CONTAINING SELECT DISTINCT IN THIS STATEMENT

Reason:

You attempted to prepare a statement that directly or indirectly references a view that contains a SELECT DISTINCT. The statement contained either a join without SELECT DISTINCT specified, or a column function. Neither of these statements can be executed against a view containing SELECT DISTINCT.

The SQLSTATE that equates to this SQL return code is 0AS01.

Action:

If the statement is a join, specify SELECT DISTINCT or remove the reference to the offending view (the offending view may be a view referenced directly or indirectly by the view that is referenced by the query). If the statement contains a column function, remove the function or the reference to the offending view.