SHARE
TWEET

Untitled

a guest Jun 26th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. BEGIN
  2.     BEGIN TRY
  3.         INSERT INTO table1 SELECT * FROM Z1;
  4.     END TRY
  5.     BEGIN CATCH
  6.         -- you can do something here if you want
  7.     END CATCH;
  8.  
  9.     -- IF ABOVE FAILS GO TO NEXT QUERY ANYWAY
  10.  
  11.     BEGIN TRY
  12.         INSERT INTO table1 SELECT * FROM Z2;
  13.     END TRY
  14.     BEGIN CATCH
  15.         -- you can do something here if you want
  16.     END CATCH;
  17.  
  18.     -- IF ABOVE FAILS GO TO NEXT QUERY ANYWAY
  19.  
  20.     BEGIN TRY
  21.         INSERT INTO table1 SELECT * FROM Z3;
  22.     END TRY
  23.     BEGIN CATCH
  24.         -- you can do something here if you want
  25.     END CATCH;
  26. END;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top