• Roopa

    You cannot use the standard RAISERROR statement in a function nor can u use the TRY...CATCH construct to throw a error.

    How ever you can catch any error in the application that calls your function. In case you want to return a exeception for some validation purpose then you can set a pre-defined value to a variable and return that.

    Just curious.. do you really require a function or can u use a procedure for your needs.

    "Keep Trying"