Question

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?

Was it helpful?

Solution 3

Turns out to be an environment setup issue. Got resolved with no change from me after a couple of builds....

Strange :-/

OTHER TIPS

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top