Skip to content
Advertisement

Tag: db2-luw

DB2 LUW MERGE using same table to update a different row

My table data looks like this My poorly attempted SQL is this… It is updating all rows in the table. I do not want this. How can I make it ONLY update the 1 latest PRINTED row which has an empty PDF_FILE ? Answer The idea is to enumerate target rows and update only the 1-st one.

nested join in Db2

Folks, what is wrong with this query i get error stating below in DB2 LUW. [42703][-206] “d.sales” is not valid in the context where it is used.. SQLCODE=-206, SQLSTATE=42703, DRIVER=4.23.42 [56098]…

Failing update table in db2 with SQLCODE: -668, SQLSTATE: 57016, SQLERRMC: 7;

I am using db2 9.5 i have created a column in table which is created successfully but i am not able to update table column and getting following error [Error] Script lines: 1-1 ————————– DB2 SQL error: SQLCODE: -668, SQLSTATE: 57016, SQLERRMC: 7;DB2ADMIN.XCATENTRYEXT Message: Operation not allowed for reason code “7” on table “DB2ADMIN.XCATENTRYEXT”. Following the some blog/sites on google

Advertisement