petek, 24. november 2006

DB2 IMPORT

It's been a long time since my last post. It has been a wild roller coaster at my job, as someone said.
During this time I also discovered something about DB2 IMPORT command. It doesn't work as the docs say. What does this mean? Sometimes you get "SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table. SQLSTATE=02000" and the row is rejected.
Hmmm. How can this be since the docs say that UPDATE should be performed via primary key? So if there were no rows to UPDATE, why does IMPORT not perform an INSERT?
What I found out is that on my target table there was a UNIQUE key defined and removing the UNIQUE key solved the problem.
Does this mean there is a bug ? In the IMPORT command itself or in the docs ? Maybe this is right for a PMR.

Ni komentarjev: