How I will avoid warring massage in below bold letter, when I am updating records using DB2/UDB API Stage. I know that target database have no match id records.
[IBM][CLI Driver][DB2/AIX64] SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table. SQLSTATE=02000
But in Oracle_OCI do not create warning massage for it.
DB2 API
Moderators: chulett, rschirm, roy
Basically, the answer is to not perform the update when there is no matching record. Oracle doesn't consider that an event worth noting, which is why you can 'get away' with it, however DB2 does.
You need to use the oh-so-common technique of hashing up the current business keys on file and then only issuing the update (via a constraint) when the record exists - i.e. is in the hash file.
You need to use the oh-so-common technique of hashing up the current business keys on file and then only issuing the update (via a constraint) when the record exists - i.e. is in the hash file.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Even though you can use hash files to check for keys, I have noticed similar DB2 message appear when the table is empty and you try 'Clear table, then insert rows'.
The solution can be to fix with selecting the rows and determining whether to clear if rowcount > 0. I wonder whether there is an alternative way!!
The solution can be to fix with selecting the rows and determining whether to clear if rowcount > 0. I wonder whether there is an alternative way!!