logo  
Google
 

DB2 SQL-Error: -583

SQLState: 42845

Short Description: THE USE OF FUNCTION IS INVALID BECAUSE IT IS NOT DETERMINISTIC OR MAY HAVE AN EXTERNAL ACTION

The function function-name is defined as a not deterministic function or a function with an external action. This type of function is not supported in the context in which it is used. The contexts in which these are not valid are: v in the expression prior to the first WHEN keyword in a simple-case-expression. v in the WHERE clause of the subselect in a CREATE VIEW statement if the WITH CHECK OPTION is specified. v in an expression of an ORDER BY clauseSystem action: The statement cannot be executed. Programmer response: If the use of a not deterministic or external action function was not intended, substitute a function without these characteristics. If the behavior associated with the not deterministic or external action function is intentional, use the alternate form of the statements that make that intent explicit. v Instead of a simple-when-clause, use the corresponding searched-when-clause where the function would get specified in each search-condition. v Remove the WITH CHECK OPTION from the CREATE VIEW statement. v Remove the function from the ORDER BY clause. If the column is part of the result set of the query, change the expression in the ORDER BY clause to the simple-integer or simple-column-name form of the sort key. See the ORDER BY syntax diagram in the DB2 SQL Reference for more information.

 <-  BACK TO INDEX