init 5075
Showing
1 changed file
with
27 additions
and
0 deletions
src/common/tools/mssql_script29.py
0 → 100644
| 1 | import pyodbc | ||
| 2 | |||
| 3 | hil_sql = """ | ||
| 4 | ALTER TABLE hil_ocr_result ADD bp_ocr nvarchar(max); | ||
| 5 | ALTER TABLE hil_se_ocr_result ADD bp_ocr nvarchar(max); | ||
| 6 | """ | ||
| 7 | |||
| 8 | afc_sql = """ | ||
| 9 | ALTER TABLE afc_ocr_result ADD bp_ocr nvarchar(max); | ||
| 10 | ALTER TABLE afc_se_ocr_result ADD bp_ocr nvarchar(max); | ||
| 11 | """ | ||
| 12 | |||
| 13 | hil_cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};', autocommit=True) | ||
| 14 | |||
| 15 | hil_cursor = hil_cnxn.cursor() | ||
| 16 | hil_cursor.execute(hil_sql) | ||
| 17 | |||
| 18 | hil_cursor.close() | ||
| 19 | hil_cnxn.close() | ||
| 20 | |||
| 21 | afc_cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};', autocommit=True) | ||
| 22 | |||
| 23 | afc_cursor = afc_cnxn.cursor() | ||
| 24 | afc_cursor.execute(afc_sql) | ||
| 25 | |||
| 26 | afc_cursor.close() | ||
| 27 | afc_cnxn.close() |
-
Please register or sign in to post a comment