brewbob wrote: > Is it possible to update a column in one table using a "where" clause > that references another table? Bob, Yes it's definitely possible. I forget when the capability was first introduced, somewhere in V4, probably R2. The following is from the V5R2 manual: "It is also possible to update an entire row in one table with values from a row in another table. Suppose there is a master class schedule table that needs to be updated with changes that have been made in a copy of the table. The changes are made to the work copy and merged into the master table every night. The two tables have exactly the same columns and one column, CLASS_CODE, is a unique key column. UPDATE CL_SCHED SET ROW = (SELECT * FROM MYCOPY WHERE CL_SCHED.CLASS_CODE = MYCOPY.CLASS_CODE) This update will update all of the rows in CL_SCHED with the values from MYCOPY. " If you can't get it going after this, list your code and we'll take a look. One of the biggest problems is making sure you handle the criteria in the where section for the table to be updated; if you don't, it will try to put a null value in the field to be updated - which you probably don't want. Bill

Reply With Quote