Let’s get back into SQL 200 by learning to deal with errors. Churchill had a great quote that applies to development (database or not) “He who fails to plan is planning to fail.” No matter how well you think you’ve planned your code, it’s going tofail. The question is, will it fail gracefully,…
Search Results for: raiserror
SQL201-The Syllabus
It’s that time again! Time to start up a new class and cover some more advanced topics in SQL Development. Before beginning these lessons, You need to be comfortable with all the material in my SQL101 series. Specifically you’re going to need to know SELECT, INSERT, UPDATE, and DELETE. With those skills in hand, I’ll…
Microsoft Exam 70-433 (part 2)
I’m putting together a new series to cover the materials you’ll need to know in order to pass the 70-433. Microsoft’s exam that covers Database Development using Microsoft SQL Server 2008. I’m going to list the topics covered in several posts, each one will include links to details to those topics. If you have any…
Nesting an Exception
Like just about every other technique in Microsoft SQL you can nest your exception handling. The basic template is: BEGIN TRY BEGIN TRY — Nested try block END TRY BEGIN CATCH — Nested catch block END CATCH END TRY BEGIN CATCH –catch block END CATCH You can do this as many levels deep as you…
Return a Success/Failure to a Job based on a SQL query?
Over on Experts Exchange, someone posted a question I felt I could answer. The user posted a question on how to return a failure and not run a job. I originally took the approach of putting a query at the top of the queries run by the job that would query the table of failure…