I tried to use a RAISERROR statement in the UDF to notify me about any errors. Why won't it work?
A1:
A The RAISERROR and PRINT statements are not valid within a UDF. To detect any errors, you must use the RETURN statement and check for any errors when the UDF returns to the calling routine.
A user-defined function can be used to provide a complex calculation to all users of the database. This would prevent requiring everyone to create his own.