-374   THE CLAUSE clause HAS NOT BEEN SPECIFIED IN THE CREATE OR ALTER FUNCTION STATEMENT FOR LANGUAGE SQL FUNCTION function-name BUT AN EXAMINATION OF THE FUNCTION BODY REVEALS THAT IT SHOULD BE SPECIFIED

Explanation

This message might be issued if the following conditions apply:
  • You must specify NOT DETERMINISTIC if either of the following conditions apply within the body of the function:
    • DB2® invokes a function that has the NOT DETERMINISTIC attribute specified.
    • DB2 accesses a special register.
  • You must specify MODIFIES SQL DATA if the body of the function defined with LANGUAGE SQL can modify SQL data or if it calls a function or a procedure that can modify SQL data.
  • You must specify READS SQL DATA if the body of the function defined with LANGUAGE SQL contains a subselect, or if it invokes a function that can read SQL data.
  • You must specify EXTERNAL ACTION if the body of the function defined with LANGUAGE SQL invokes a function that has the EXTERNAL ACTION attribute specified.

System action

The statement cannot be processed.

Programmer response

Specify the correct clause or change the function of the body.

SQLSTATE

428C2