Login    
 
 
 
 
Text/HTML
  
You are here :: Blogs Saturday, May 19, 2012

Search
Note: This uses the internal blog search engine. The Google search engine is also available at the top of the page.
  
Disclaimer

Please review the site disclaimer before downloading or using content found on this site

  
Categories
  
DEVSHED Blog
As always, I welcome your comments!
Jul 17

Written by: Steve Gray
7/17/2009 8:58 AM  RssIcon

The code to raise an error in SQL is not all that complicated, but it helps to have a template handy, it saves some typing. Why not just store it in the SSMS template area? I’m a consultant, I work on SQL Servers everywhere. A blog is a much handier place for templates.

Is it just me, or does RAISERROR look misspelled? What happened to that missing ‘E’?

declare @msg varchar(100)
set @msg = 'Error Message'
 
if @thereIsAnError = 1 begin
    raiserror (@msg,16,2)
    return 
end 

Tags:
Categories:
Location: Blogs Parent Separator DEVSHED Blogs Child Separator SQL
As always, I welcome your comments!
  
 
 
Home | Products | Blogs | Contact Us | Links | God's Plan
Privacy Statement | Terms Of Use
 
Copyright 2011 by Devshed.us