Page 1 of 1

Delete rows from empty table

Posted: Tue Jan 17, 2012 9:59 am
by sainath
Hi

We just upgraded to PX 8,7 ..when i tried to delete the records when the table is empty i am getting following error


SQL0100W : No rows was found for FETCH,UPDATE OR DELETE or the result of query in the empty table SQL STATE -2000

this was working fine in 8.5.

Please share your ideas...

Posted: Tue Jan 17, 2012 10:34 am
by BI-RMA
Hi sainath,

Is this a message from the database or from the parallel engine? SQL011W sounds rather like a message from the database. Did You change Your DB-version, too?

We had similar experiences when moving from DB2 for iSeries 5.4 to version 6.1. We saw a lot of new warnings concerning Metadata-mismatches when we moved to the new platform, for example.

Actually DB2 does throw a warning like this when fetching an empty cursor.

Posted: Thu Jan 19, 2012 8:49 pm
by qt_ky
Do you have any message handlers defined in 8.5 that would hide that warning from you?

Posted: Thu Jan 19, 2012 11:38 pm
by chandra.shekhar@tcs.com
Sainath, I think you need not to worry about that. It is just a warning that while deleting the rows from table it didnt find any. Even when you delete rows from a table in a database, it will again give this warning.
And if you dont want to see this warning in the director, just use message handler :)

Posted: Fri Jan 20, 2012 12:57 am
by BI-RMA
Before following the advice to set a message handler, check the following:

Is the message that is to be demoted sufficiently specific not to interfere with any other activities in your job? In version 8.0.1 we had a lot of messages from DB2 for iSeries that were all displayed using the same message-code in the director log. Demoting a warning displayed for an unrestricted delete on a table also demoted warnings for rows rejected due to duplicate keys.

Posted: Fri Jan 20, 2012 4:43 am
by pandeesh
I believe, this warning is pretty comman while using connector stage.
You can make use of any other database stage apart from connector stage.

Posted: Fri Jan 20, 2012 8:04 am
by qt_ky
The message you get is exactly the message you should get in this case. It is not a problem; it is to be expected.

I would be more concerned why you are not getting the DB2 warning in your older version.