由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Quant版 - error run SQL query from pyodbc python 3.2.5
相关主题
access two databases in one ODBC connection from pyodbc (转载)问面试题
create table on SQL server from python pyodbc请教在JPM内部换部门的难度
get value returned by SQLstored procedure from python (转载)[合集] 如果只是programmer也是经常加班的吗
python 在windows下连接数据库[合集] 想问个职业规划的问题~
error of access IBM Netteza database from C# in Visual Stud (转载)[合集] Front-Offce, Mid-Office and Back-Office区别在那?
[合集] 网申Merrill Lynch, Visa一栏怎么填?Help: learning SQL
Probability question金融工程程序大收集
问道概率题求Hedge Fund公司软件开发面试题
相关话题的讨论汇总
话题: sql话题: pyodbc话题: error话题: my话题: server
进入Quant版参与讨论
1 (共1页)
l******9
发帖数: 579
1
I am working on pyodbc in Eclipse (4.3.2v20140221-1852) with PyDev on Win 7.
My python is 3.2.5.
At my code:
cursor.execute("select top " + str(1) + " a.my_id, a.mycode" +
"from my_table as a where a.mycode = ?", aGivenCode)
I got an error :
pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][ODBC SQL Server
Driver]
[SQL Server]Incorrect syntax near the keyword 'as'. (156) (SQLExecDirectW)")
Why I got error at " as a " ?
thanks !
k*****n
发帖数: 117
2
try remvoing 'as':
cursor.execute("select top " + str(1) + " a.my_id, a.mycode" +
"from my_table a where a.mycode = ?", aGivenCode)
1 (共1页)
进入Quant版参与讨论
相关主题
求Hedge Fund公司软件开发面试题error of access IBM Netteza database from C# in Visual Stud (转载)
请教求职面试题:如何写一个SQL query求N行N列表中对角线的和[合集] 网申Merrill Lynch, Visa一栏怎么填?
所有热心大虾们: 请帮我策划一下我接下来该学什么技能吧.Probability question
Quant Analyst Position问道概率题
access two databases in one ODBC connection from pyodbc (转载)问面试题
create table on SQL server from python pyodbc请教在JPM内部换部门的难度
get value returned by SQLstored procedure from python (转载)[合集] 如果只是programmer也是经常加班的吗
python 在windows下连接数据库[合集] 想问个职业规划的问题~
相关话题的讨论汇总
话题: sql话题: pyodbc话题: error话题: my话题: server