Page 1 of 1

is it possible to view DB2 query?

Posted: Sat Jun 14, 2008 11:42 pm
by hitmanthesilentassasin
Hi,

when i am trying to run the update command in db2udb enterprise stage i am getting the below error. But for sure i know that there exists rows in the target table matching the where condition. the error i get is
sqlcode=100, state=HY000, message=[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
THanks for your help.

Posted: Sun Jun 15, 2008 2:51 am
by ArndW
I you take the exact same UPDATE statement and execute it with the command line "db2 ..." command does it work? Would it be possible to post your DB2 query?

Posted: Sun Jun 15, 2008 8:32 am
by hitmanthesilentassasin
Well, these are the stops i have already executed.

just before the db2 stage i split the data and routed to seek stage and captured the output. Now i substitue the column values derived after transformations into the query and run it from the DB2 prompt - Bang! It works like a charm. at the same time the same data routed to db2 satge failed to update the rows. I wanted to see what is the Query being used to run the update. I know it has been written by me but still i wanted to know is there any modificaitons happening while executing it.

Mode I am currently running is Write method with user defined update only.

Thanks for any further inputs.

Posted: Sun Jun 15, 2008 8:50 am
by ArndW
Hard to say without seeing your SQL. Perhaps you are using CHAR fields and need to do som TRIMming?

Posted: Sun Jun 15, 2008 9:26 am
by hitmanthesilentassasin
well, I am using time field to match time field and Date field to match date field. the output format of the fields is perfectly alright( As i have already checked in the peek). Also, as a second exercise I have replaced the column names with the output values of the peek stage and Still the job goes very well by updating the rows. Any more food for thought?

Posted: Sun Jun 15, 2008 9:32 am
by ArndW
No more food for thought from me. I asked for the SQL twice without success so I am giving up.

Posted: Sun Jun 15, 2008 9:36 am
by hitmanthesilentassasin
well sorry mate - I dont want to post the query. I would appreciate if i get a new way to think ahead. Anyways, Thanks for your help.