I have a scenario where I need something similar to .NET\'s try-catch-finally block.
.NET\'s try-catch-finally block.
On my try, I will CREATE a #temp table, INSERT
CREATE a #temp table
INSERT
using custom error number to indicate there no real error, just final code?
-- create temp table; BEGIN TRY -- use temp table; THROW 50555; END TRY BEGIN CATCH -- drop temp table; IF ERROR_NUMBER() <> 50555 THROW; -- rethrow the error END CATCH