locked
How to signal a condition from inside the SP/Function RRS feed

  • Question

  • Hi there

    I'm working on Pervasive -> MS SQL migration project.

    The Pervasive has the operator SIGNAL which allows you to signal an exception
    condition or a completion condition other than successful completion of the function

    Is there such analogue for the MS SQL?

    Thanks.

    Wednesday, November 27, 2013 4:34 PM

Answers

All replies

  • You might want to look in to RAISERROR (http://msdn.microsoft.com/en-us/library/ms178592.aspx).  Is that what you were looking for?
    • Marked as answer by Renziglov Wednesday, November 27, 2013 4:57 PM
    Wednesday, November 27, 2013 4:43 PM
  • What do you mean by completion of the function?

    Looks like you are looking for CASE or TRY/CATCH


    Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    • Marked as answer by Renziglov Wednesday, November 27, 2013 4:57 PM
    • Unmarked as answer by Renziglov Wednesday, November 27, 2013 4:57 PM
    Wednesday, November 27, 2013 4:44 PM
    Answerer
  • ... and in 2012, we also have THROW.

    Tibor Karaszi, SQL Server MVP | web | blog

    Wednesday, November 27, 2013 7:23 PM