DROP FUNCTION And UDTs
This topic does not apply to SQL UDFs.
You cannot drop an external UDF if it is being used as a cast routine, ordering routine, or transform routine. Otherwise, the request aborts and the system returns an error to the requestor.
To drop an external UDF that is supplying cast, ordering, or transform functionality to a UDT, you must first drop the definition for the cast, ordering or transform (see “DROP CAST” on page 793, “DROP ORDERING” on page 806, or “DROP TRANSFORM” on page 812). After you have done that, you can drop the UDF.