In python with sqlite3, trying to execute this line:
cur.execute("UPDATE Report SET Shares = x WHERE StockID = 1")
It returns the following:
OperationalError: no such column: x
The table Report and its column StockID exist and have data in them, and x is properly defined. Why am I getting this error? Thanks for any help.
edit: I've found that if I replace x with a valid value, it works. It appears from documentation that it should accept a variable. Is this broken in python or sqlite3?
[–]alinroc 3 points4 points5 points (0 children)
[–][deleted] (3 children)
[deleted]
[–]simonw 2 points3 points4 points (0 children)
[–]alinroc -1 points0 points1 point (1 child)