Station = SN[0]
Asset = AN[0]
y = ASD[0]
z = ACD[0]
cursor = conn.cursor()
cursor.execute('SELECT * FROM station')
cursor.execute('''
UPDATE station
SET ActualStartDate = y, ActualCompletionDate = z
WHERE StationName = @Station and AssetNumber = @Asset
''')
conn.commit()
I am getting this error:
('42000', '[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Must declare the scalar variable "@Station". (137) (SQLExecDirectW)')
I would like to get the values from 4 numpy arrays above, SN[0], AN[0], SCD[0] SSD[0] and use these values in the UPDATE Query.
Is it possible to execute this?