Win 7에서 PyDev로 Eclipse (4.3.2v20140221-1852)의 pyodbc에서 작업하고 있습니다. 파이썬 3.2.5 . 내 코드에서Python의 pyodbc에서 cursor.execute에서 SQL 쿼리를 실행하는 중 오류가 발생했습니다. 3.2.5 onm win 7
:
cursor.execute("select top " + str(1) + " a.my_id, a.mycode" +
"from my_table as a where a.mycode = ?", aGivenCode)
나는 오류를 가지고 :
pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][ODBC SQL Server Driver]
[SQL Server]Incorrect syntax near the keyword 'as'. (156) (SQLExecDirectW)")
나는 "으로"에서 오류가 발생했습니다 이유는 무엇입니까?
감사합니다.