DB2 上的 SQL0100W 错误
在 DB2 上运行 sqr 报告时出现以下错误:
SQL0100W - No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table. SQLSTATE=02000
当我将有问题的 sql 粘贴到 RapidSQL 中并替换参数时,它可以正确运行。 有问题的 sql 是一个插入选择。 选择不会返回任何行,这很好...我希望报告对于我的参数为空白。
知道我该如何解决这个问题吗?
I get the following error when running an sqr report on DB2:
SQL0100W - No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table. SQLSTATE=02000
The sql in question runs correctly when I paste it into RapidSQL, replacing the parameters. The sql in question is an insert-select. No rows are returned by the select, and this is fine... I expect the report to be blank for my parameters.
Any idea how I can get around this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果 SQR 无法正常处理 NOT_FOUND SQL0100 返回,则编写一个初步查询以返回满足实际查询条件的行数。 当且仅当前面的查询返回的行计数不为零时,检查 SQR 中 if-then 块中的计数结果以运行实际查询。
If SQR can't gracefully handle a NOT_FOUND SQL0100 return, then code a preliminary query to return a count of the number of rows that satisfy the conditions of the actual query. Check the result of the count in an if-then block in SQR to run the actual query if and only if the row count returned by the preceding query was not zero.
原来是环境设置问题。 经过几次构建后,我没有做出任何改变,得到了解决......
奇怪:-/
Turns out to be an environment setup issue. Got resolved with no change from me after a couple of builds....
Strange :-/
如果您使用逻辑操作删除删除多个记录,例如从选项卡名称中删除,其中columnnmae=deleterecord和columnnmae=deleterecord,那么它们会显示这种类型的错误。
if you delete delete more than one record using logic operation like delete from tabname where columnnmae=deleterecord and columnnmae=deleterecord then they show this type error.machine an
当没有返回行时,DB2 始终返回 SQL0100 警告(这是警告,而不是错误 - 错误将具有负值)。 它就是这样儿的。
我根本不了解peoplesoft - 所以我无法给你任何指示。 当我为 DB2 编程时,我们忽略了那些 SQL0100 警告。
DB2 returns always an SQL0100 warning (this is a warning, not an error - errors would have negative values) when no rows are returned. That's the way it is.
I don't know peoplesoft at all - so I can't give you any pointers with that. Back when I was programming for DB2 we ignored those SQL0100 warnings.