The SQL query is stored in a notepad file. Need to run this using Python scripts
cursor = connection.cursor()
with open('C:\Python_Script_Test\SQL_Query.txt','r') as inserts:
query = inserts.read()
cursor.execute(query)
Expected is that the query should execute.
Actual getting below error:
with open('C:\Python_Script_Test\SQL_Query.txt','r') as inserts: " syntax error: (unicode error) 'unicodeescape' codec cant decode bytes in position 2-3: truncated \UXXXXXXXX escape
error is pointing at the comma inserted in the above line just before mode. tried replacing single quotes with double but no luck also, my query is multi line.
Please help