G'day, The reference to RP2.EMPLID in line 6 is out of scope as you've already closed the inner select in line 5. I assume you want to sum all the values where the employee ID matches? Drop the GROUP BY in line 5 and move the conditional in line 6 to line 4 with the AND between them and then close the select. Hope that helps. Cheers. AB -----Original Message----- From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Eileen Lafond Sent: Thursday, 21 August 2008 3:44 AM To: programmingblind@xxxxxxxxxxxxx Subject: Oracle error message Hi, I have an Oracle error message in my code that I cannot figure out how to resolve. I am placing the code here and if anyone has any suggestions, please let me know: UPDATE RP08_R2_EMPL_TBL rp1 2 SET rp1.TOTAL_PRECOLA_PAID = 3 (SELECT SUM(rp2.resource_amount) FROM rp08_r2_retro_pay_sum rp2 4 WHERE rp2.eliminate_status = 'Y' 5 GROUP BY rp2.emplid) 6 WHERE RP1.EMPLID = RP2.EMPLID 7 / WHERE RP1.EMPLID = RP2.EMPLID * ERROR at line 6: ORA-00904: "RP2"."EMPLID": invalid identifier commit; Commit complete. spool off Thanks for any help! Eileen La Fond Phone (206) 386-0011 e.mail Eileen.LaFond@xxxxxxxxxxx __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ NOD32 3373 (20080821) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind