Drop overloaded UDF

Extensibility
Teradata Employee

Drop overloaded UDF

I've created four UDFs to handle data transformation from MAINFRAME source files. Originally the data type for all UDFs was to be fixed as VARCHAR, however after careful investigation of source data by one of my colleagues, two of the functions needed to be overloaded to accept both VARCHAR and VARBYTE, and the remaining two UDFs required both VARCHAR and DECIMAL.

I'm running a DROP statement for all UDFs before running a REPLACE FUNCTION statement, however I encounter the following problem (extract from log file; have used <**> to mask database name):

DROP FUNCTION <**>.udf_9sComplement_DECIMAL;
*** Failure 5589 Function 'udf_9sComplement_DECIMAL' does not exist.
Statement# 1, Info =0
*** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----
DROP FUNCTION <**>.udf_9sComplement_VARCHAR;
*** Failure 5589 Function 'udf_9sComplement_VARCHAR' does not exist.
Statement# 1, Info =0
*** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----
DROP FUNCTION <**>.udf_9sComplement;
*** Failure 5593 Cannot determine the best-fit function for 'udf_9sComplement'.
Statement# 1, Info =0
*** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

Both the udf_9sComplement_DECIMAL and udf_9sComplement_VARCHAR UDFs exist under the relevant database using Teradata Administrator, however the udf_9sComplement UDF does not.

Is a different syntax required to DROP overloaded UDFs? Any help would be greatly appreciated.
Tags (3)
2 REPLIES
Senior Apprentice

Re: Drop overloaded UDF

help 'sql drop function';
or a quick look at the manuals reveals there's a
DROP SPECIFIC FUNCTION

Dieter
Teradata Employee

Re: Drop overloaded UDF

That's great Dieter, thanks very much for the assistance. It now works perfectly.