In the CBA Table I need to set the access level to 3 if 1. the current access level is NULL and 2.the key(CBA_ID) has is listed in the DUES_PAID table. DUES PAID has multiple entries for this foreign key, one for each year they subscribed.
If there are no entries for the CBA_ID in the Dues_paid table then I need to set the access level to 2
update CBA_Copy SET access_usr = 3
WHERE access_usr IS NULL AND CBA_ID =( SELECT MAX(CBA_ID) FROM DUES_PAID GROUP BY CBA_ID)