is it possible to view DB2 query?

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

is it possible to view DB2 query?

Post 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.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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?
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post 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.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Hard to say without seeing your SQL. Perhaps you are using CHAR fields and need to do som TRIMming?
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post 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?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

No more food for thought from me. I asked for the SQL twice without success so I am giving up.
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post 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.
Post Reply