I am faced with the following error -
Number (213) Severity (16) State (5) Server (ASED052) Insert error: column name or number of supplied values does not match table definition.
and I am trying to catch it with -
IF @@ERROR != 0
BEGIN
-- Do stuff
END
However, I have found out that this error does not set the global @@ERROR
variable. As such is the case, does anyone know of another method to catch this error?
Apparently there is no way to catch the specified error using the global @@ERROR
variable.