I have 3 tables, say RELATIONS,PERSON,COMPANY
I need to UPDATE
active_flag
field of PERSON
to 'I'/'A'
by joining these 3 tables.
My requirement is like
UPDATE PERSON p
SET p.active_flag ='I'
FROM PERSON p,RELATIONS r,COMPANY c
WHERE p.email ='email@gmail.com'
AND c.rel_id = r.id
AND r.dep_id = '1234567'
AND r.book_id = '1234567'
How can I do that??