Chinaunix

标题: python sybase无法执行创建临时表的sql? [打印本页]

作者: ren21103    时间: 2014-03-11 18:34
标题: python sybase无法执行创建临时表的sql?
请教大家, 用python访问Sybase的时候,是不是无法创建临时表? 有什么办法么?多谢了

>>> import Sybase
>>> ht=Sybase.connect("server1","user1","password1")
>>> hc=ht.cursor()
>>> hc.execute("select * into #tmp_tbl from tbl1 where 1=0")

会提示下面错误,

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.solaris-2.10-sun4u/egg/Sybase.py", line 734, in execute
  File "build/bdist.solaris-2.10-sun4u/egg/Sybase.py", line 879, in _start
  File "build/bdist.solaris-2.10-sun4u/egg/Sybase.py", line 893, in _mainloop
  File "build/bdist.solaris-2.10-sun4u/egg/Sybase.py", line 938, in _raise_error
Sybase.DatabaseError: Msg 3803, Level 16, State 1, Line 65535
The statement used to define the cursor 'ctmp29baf8' is neither a SELECT nor an EXECUTE.








欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2