|
|
使用Powerdesigner设计Sybase的存储过程时 如果使用到了临时表,则需要显示的将临时表删除以释放资料,可在下面的情况中: ... truncate table #jsbdf drop table #jsbdf end truncate table #pbbf drop table #pbbf ... 却在执行SQL的时候报错: *** Execution of statement failed: [INTERSOLV][ODBC SQL Server driver][SQL Server]Incorrect syntax near the keyword 'drop'.
SQLSTATE = S1000
最终解决方法居然是在truncate table和drop table之间加上一个空注释“--” 空注释还必须单独占一行,否则仍然报错,也就是: truncate table #pbbf -- drop table #pbbf 就没事了 而同样情况在sybase的sql advantage下执行却没有问题
环境: Sybase Sql Server : 11.92 Sybase Open Client : 12 Charsets : cp936 Operation System : windows 2000 chs sp4 Powerdesigner : 9.5
|
|