How to report an error from a SQL Server user-defined function How to report an error from a SQL Server user-defined function sql-server sql-server