由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - error run SQL query from pyodbc python 3.2.5 (转载)
相关主题
error of sql query in MS Access database (转载)[转载] Can anyone interpret this simple SQL?
问个SQL的问题parameterized queries with no inputs
change year format in Access by SQL query (转载)A SQL query never stop running is bothering me: help needed (转载)
Error of SQL query on IBM netezza SQL database from Aginity (转载)[转载] ASP问题: Operation must use an updateable query
access two databases in one ODBC connection from pyodbchow to get the result in the middle of resultset?
create table on SQL server from python pyodbc (转载)有没有可能将在Access里做好的东西导入到Oracle里去
一个SQL query的问题tbl1.col1 = tbl2.col2 (+)
[转载] question about SQL in AccessPIVOT, 请大拿,帮我debug
相关话题的讨论汇总
话题: sql话题: pyodbc话题: error话题: server话题: my
进入Database版参与讨论
1 (共1页)
l******9
发帖数: 579
1
【 以下文字转载自 Quant 讨论区 】
发信人: light009 (light009), 信区: Quant
标 题: error run SQL query from pyodbc python 3.2.5
发信站: BBS 未名空间站 (Thu Jun 19 12:04:26 2014, 美东)
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 !
r**********d
发帖数: 510
2
Space between code and from? General tip for debugging query is print out
the query that you asks the to run and run it in DBS. That fixes a lot of
errors for me
1 (共1页)
进入Database版参与讨论
相关主题
PIVOT, 请大拿,帮我debugaccess two databases in one ODBC connection from pyodbc
新手请教几个sqlzoo上的问题create table on SQL server from python pyodbc (转载)
请帮我查一段pivot code 错在哪里?一个SQL query的问题
a question of ODBC, thanks[转载] question about SQL in Access
error of sql query in MS Access database (转载)[转载] Can anyone interpret this simple SQL?
问个SQL的问题parameterized queries with no inputs
change year format in Access by SQL query (转载)A SQL query never stop running is bothering me: help needed (转载)
Error of SQL query on IBM netezza SQL database from Aginity (转载)[转载] ASP问题: Operation must use an updateable query
相关话题的讨论汇总
话题: sql话题: pyodbc话题: error话题: server话题: my