Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

what does the second @@error return? Expand / Collapse
Author
Message
Posted Wednesday, March 21, 2012 5:33 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 11:50 AM
Points: 3,835, Visits: 4,413
@@error will have the right error code if selected immediately after raiserror command

raiserror('oh no, another error!', 16,1)
select @@error

Thanks




Igor Micev,
SQL Server developer at Seavus
www.seavus.com
Post #1270564
Posted Friday, February 1, 2013 5:45 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, July 12, 2016 5:52 AM
Points: 347, Visits: 280
Previous question also same like this.... easy only.....





Manik
Go fast as possible






Manik
You cannot get to the top by sitting on your bottom.
Post #1414607
Posted Monday, November 16, 2015 4:30 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 10:03 AM
Points: 2,351, Visits: 198
Hi,

I executed this code in SQL Serve 2012 and I received the errors sequence:

(1 row(s) affected)
Msg 50000, Level 16, State 1, Line 2
oh no, error!

(1 row(s) affected)

(1 row(s) affected)
Msg 50000, Level 16, State 1, Line 6
oh no, another error!

(1 row(s) affected)

(1 row(s) affected)

I answered 50.000
Post #1736857
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse