Python Error Updating A Sql Db
I have some python code that looks like this import pypyodbc import pandas as pd home='c:/SQL/' df = pd.read_sql_query(sql4, conn3 for y1 in range(0 , k): ARCHIVE_SERNUM = (df
Solution 1:
An easy enough mistake to make.
cursor.execute("""
UPDATE ENCOMPASS_DIA
SET CTIME=%s
WHERE SERNUM=ARCHIVE_SERNUM
""", (STIME, ))
There should be a trailing ,
after the STIME
or (STIME) will be interpreted as a list instead of a tuple.
Post a Comment for "Python Error Updating A Sql Db"