Start of change

-476 REFERENCE TO ROUTINE routine-name WAS IDENTIFIED WITHOUT A SIGNATURE, OR BY BOTH SIGNATURE AND SPECIFIC NAME, BUT THE ROUTINE IS NOT UNIQUE WITHIN ITS SCHEMA

Explanation

References to a routines without a signature are permitted, but the identified routine routine-name must be unique in its schema and it is not.

Note also that in the ALTER FUNCTION, DROP FUNCTION, COMMENT, GRANT and REVOKE (for EXECUTE on functions) statements, an unqualified reference is qualified with the default schema, and this is the schema where the problem can be found. In the SOURCE clause of a CREATE FUNCTION statement, the qualification comes from the SQL path. In this case, the first schema in the path containing a function with this name had other functions by the same name.

System action

The statement cannot be processed.

Programmer response

If the statement references a function, take one of the following actions:
  • Complete the signature.
  • Use the SPECIFIC name of the function.
  • Change the SQL path.

If the statement references a procedure, a procedure with the same name exists, but there are differences in the parameter list. To change the parameter list of the existing procedure, add the SPECIFIC clause with the name of the procedure to the CREATE statement.

SQLSTATE

42725

End of change