Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. sql = [ u"ALTER TABLE {tab_mc} ADD bez_UR number(38,8)".format(tab_mc = mc_results),
  2. u"UPDATE TP_MC_STAT set test_col = 1000",
  3. # u"DROP TABLE TP_MC_STAT", ##WHEN TABLE IS NOT DELETED, NEXT SQL RAISE AN EXCEPTION
  4. u"CREATE TABLE TP_MC_STAT (test_col int)",
  5. u"UPDATE TP_MC_STAT set test_col = 4"]
  6. sde_connector.startTransaction()
  7. for row in sql:
  8. try:
  9. sde_connector.execute(row)
  10. except Exception as err:
  11. raise Exception(row," ...>>>... ",err.message)
  12. sde_connector.commitTransaction()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement