im trying to insert values into a column that a user has asked to be changed which is called surnamereq and the user change which is called name1. money_spent is the name of the table and first_name is the column that the user is changing the value of.
This is how it should be written in SQL(i think):
INSERT INTO money_spent(first_name)
WHERE last_name = surnamereq
VALUES(name1)
This is what ive got in python:
cursor.execute("INSERT INTO money_spent(first_name) WHERE last_name = ?, surnamereq VALUES(name1)")
Thanks
UPDATEstatement, not anINSERTstatement. (INSERTis for adding a new row.)cursor.execute(""" UPDATE money_spent SET first_name = ?, fname WHERE last_name = ?, surnamereq""")pyodbc.Error: ('07002', '[07002] [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect (17) (SQLExecDirectW)')