Start of change

-20120   AN SQL TABLE FUNCTION MUST RETURN A TABLE RESULT.

Explanation

An SQL function that specifies TABLE in the RETURNS clause must return a result that is a table.

System action

The statement cannot be processed.

User response

Either remove the TABLE keyword from the RETURNS clause to make it a scalar function or specify a fullselect in the RETURN statement of the TABLE function body.

SQLSTATE

428F1

End of change