Skip to content Skip to sidebar Skip to footer

How To Throw Exception From Sql Server 2005 Function?

When I try to use RaiseError, I get the following compilation issue Msg 443, Level 16, State 14, Procedure ConvertSessionToCurr, Line 19 Invalid use of a side-effecting operato

Solution 1:

Options:

  • Return NULL or some sentinel value
  • Use a stored procedure
  • Make it inline code

My thought is that if you need RAISERROR in a UDF you're using it wrong...

Post a Comment for "How To Throw Exception From Sql Server 2005 Function?"