从embarcadero delphi执行时,sqlite运行总计失败
我没有成功地从Delphi Xe7内部执行选择
。当从sqliteexpert(或任何其他类似的应用程序)运行时,相同的查询非常可行。
我有select
的几个变体,但是所有这些变体都在相同的错误消息中失败。
我给您一个我想运行的选择的示例:
FDQry.SQL.Clear;
FDQry.SQL.Add(SELECT num, account, amount, SUM(amount) OVER ( ROWS UNBOUNDED PRECEDING ) AS RunningTotal FROM MyTable where account='NFI');
FDQry.Open;
我得到此错误:
“”“近”(“语法错误”
I have unsuccessfully tried to execute a SELECT
from inside Delphi XE7. The same query perfectly works when run from inside SqliteExpert (or any other similar app).
I have trie several variations of the SELECT
, but all of them fail with the same error message.
I give you an example of the select I would like to run:
FDQry.SQL.Clear;
FDQry.SQL.Add(SELECT num, account, amount, SUM(amount) OVER ( ROWS UNBOUNDED PRECEDING ) AS RunningTotal FROM MyTable where account='NFI');
FDQry.Open;
I get this error:
" " near "(" syntax error "
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道该示例是否是错误,但是您需要在添加中使用引号。毕竟,该参数是字符串。
I don't know if it is a error in the example, but you need to use quotes inside the Add. The parameter is a string after all.