stuffittrans, you are correct, with the additional explanation that since @daffy doesn't exist when the EXCEPTION is raised, the reference to @daffy inside the exception handler raises a second exception and that's the message which is displayed. In a big procedure with several hundred lines, that can be truly confusing, at least to me. If you're going to Techwave, hit me up for a drink, I'll be the attendee riding a motorized scooter 'round the Mandalay :)
The following line:
ReplyDeleteDECLARE @minnie INTEGER;
causes an exception (you cannot have two @minnie variables), so the next line
DECLARE @daffy INTEGER;
never gets executed.
stuffittrans, you are correct, with the additional explanation that since @daffy doesn't exist when the EXCEPTION is raised, the reference to @daffy inside the exception handler raises a second exception and that's the message which is displayed. In a big procedure with several hundred lines, that can be truly confusing, at least to me. If you're going to Techwave, hit me up for a drink, I'll be the attendee riding a motorized scooter 'round the Mandalay :)
ReplyDelete