February 19, 2013 at 9:21 pm
Comments posted to this topic are about the item THROW - 1
February 19, 2013 at 9:57 pm
Thanks Ron for another one on SQL-2012.
Need to do a bit of reading to answer this (example [A] in BOL was sufficient to provide necessary hints) 🙂
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
February 19, 2013 at 9:59 pm
how should I say it ?? :w00t:
I got that right ..was caught up for a while in severity level , as in msdn , when Throw used without parameters, the level suggested 14 ..
and what a well formed questiion
"The user defined error message 55555 does NOT exist in sys.messages"
--(you were thinking it :-P)
well, learned something ..
thanks for the question ...
~ demonfox
___________________________________________________________________
Wondering what I would do next , when I am done with this one :ermm:
February 19, 2013 at 11:27 pm
Great question Ron, thanks!
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
February 20, 2013 at 12:01 am
After reading BOL twice, Got some knowledge about it ..
I'm slightly confused with Level mentioned in example B (BOL) . But anyway I managed get it correct..
--
Dineshbabu
Desire to learn new things..
February 20, 2013 at 12:24 am
Hi,
i am not sure about correct answer. When i execute this T-sql in Sql server 2012.
It shows Level 14 ,State 1 and message = "why oh why do you do this".
When i check BOL, it's showing "The severity is set to 16."
Can someone make it clear that why my answer is incorrect ?
Thanks
Vinay Kumar
Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
February 20, 2013 at 12:50 am
This was removed by the editor as SPAM
February 20, 2013 at 1:23 am
Great question, thanks!
😀
February 20, 2013 at 3:03 am
Can anyone please explain about the error level 14 and 16. I am not able to understand this
February 20, 2013 at 3:26 am
oh if only we had 2012 :'( lol 😛
got 2 out of 3 right guesing after googling how THROW works :w00t:
good question and well written 😛
Regards
ld
Stoke-on-Trent
United Kingdom
If at first you don't succeed, go to the pub and drink away your current thought plan.
February 20, 2013 at 5:29 am
Nice interesting question.
I really must upgrade and get SQL2012 so that I can start playing with this stuff instead of just reading about it.
If people have run the code and got 14 for erros state, what's going on? I would expect to see 14 only if THROW was called without any parameters (to rethrow the previous error).
Tom
February 20, 2013 at 7:47 am
L' Eomot Inversé (2/20/2013)
Nice interesting question.I really must upgrade and get SQL2012 so that I can start playing with this stuff instead of just reading about it.
+ 1
Thanks for the question on a 2012 feature.
February 20, 2013 at 9:04 am
L' Eomot Inversé (2/20/2013)
Nice interesting question.I really must upgrade and get SQL2012 so that I can start playing with this stuff instead of just reading about it.
If people have run the code and got 14 for erros state, what's going on? I would expect to see 14 only if THROW was called without any parameters (to rethrow the previous error).
I think people said they got severity level 14, not error state 14. They must be looking at the results of the SELECT in the CATCH block, which does show Level = 14, rather than the error message returned by the THROW statement, which always shows "Level 16" as its defined behavior.
Jason Wolfkill
February 20, 2013 at 9:35 am
Awesome, thanks for the question on new 2012 functionality.
February 20, 2013 at 10:27 am
I'm having a senior blonde moment here...
What is the difference between:
THROW returns the same error message as the select statement
and
THROW returns the error message "why oh why do you do this"
Viewing 15 posts - 1 through 15 (of 25 total)
You must be logged in to reply to this topic. Login to reply