Avatar of maqskywalker
maqskywalker

asked on 

using RAISERROR in SQL Server query

I'm using SQL Server 2008

I was looking at the RAISERROR documentation on this page:
https://docs.microsoft.com/en-us/sql/t-sql/language-elements/raiserror-transact-sql?view=sql-server-2017

So the syntax is this:

User generated image
the first part is string message, then severity, then state

Then towards the bottom of the page it has this example with severity of 10 and state of 1:

User generated image
What does a severity of 10 mean?
What does a severity of 16 mean?
What does a state of 1 mean?
Microsoft SQL ServerMicrosoft SQL Server 2008SQL

Avatar of undefined
Last Comment
maqskywalker
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of maqskywalker
maqskywalker

ASKER

I saw this chart on severity levels in the book sql server 2008 bible in the image link below.

Right now when I set the severity level to 16 the error message displays in a window with ok button, if I press ok button the stored procedure doesn’t finish and exits.

So if I set the severity level to something other than 16 is there way that the message still displays (as more of a reminder), then if I press ok on the button in the window then I want the rest of the stored procedure to finish running?
75CD8C16-6977-45F4-9D0A-8805786DE1F.jpeg
SOLUTION
Avatar of EugeneZ
EugeneZ
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of maqskywalker
maqskywalker

ASKER

Thanks
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo