mssql_script13.py
2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import pyodbc
hil_sql = """
create table hil_auto_settlement
(
id bigint identity primary key,
application_id nvarchar(64) not null,
aa_type nvarchar(64),
rpa_result smallint,
rpa_1st_eye_tat decimal(18,0),
rpa_2nd_eye_tat decimal(18,0),
rpa_3rd_eye_tat decimal(18,0),
rpa_total_tat decimal(18,0),
rpa_activated_time datetime,
rpa_get_case_from_ocr_time datetime,
rpa_get_case_from_oc_time datetime,
rpa_payment_authorize_time datetime,
rpa_second_eye_time datetime,
on_off bit default 1 not null,
ocr_auto_result_pass bit default 0 not null,
ocr_auto_result nvarchar(max),
ocr_latest_comparison_time datetime,
update_time datetime not null,
create_time datetime not null
);
create index hil_auto_settlement_application_id_index
on hil_auto_settlement (application_id);
"""
afc_sql = """
create table afc_auto_settlement
(
id bigint identity primary key,
application_id nvarchar(64) not null,
aa_type nvarchar(64),
rpa_result smallint,
rpa_1st_eye_tat decimal(18,0),
rpa_2nd_eye_tat decimal(18,0),
rpa_3rd_eye_tat decimal(18,0),
rpa_total_tat decimal(18,0),
rpa_activated_time datetime,
rpa_get_case_from_ocr_time datetime,
rpa_get_case_from_oc_time datetime,
rpa_payment_authorize_time datetime,
rpa_second_eye_time datetime,
on_off bit default 1 not null,
ocr_auto_result_pass bit default 0 not null,
ocr_auto_result nvarchar(max),
ocr_latest_comparison_time datetime,
update_time datetime not null,
create_time datetime not null
);
create index afc_auto_settlement_application_id_index
on afc_auto_settlement (application_id);
"""
hil_cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};', autocommit=True)
hil_cursor = hil_cnxn.cursor()
hil_cursor.execute(hil_sql)
hil_cursor.close()
hil_cnxn.close()
afc_cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};', autocommit=True)
afc_cursor = afc_cnxn.cursor()
afc_cursor.execute(afc_sql)
afc_cursor.close()
afc_cnxn.close()