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


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 7:29 PM
Points: 4,012, Visits: 4,733
@@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: Thursday, November 24, 2016 7:31 AM
Points: 348, Visits: 292
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: Friday, November 25, 2016 4:54 AM
Points: 2,661, Visits: 206
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