I Have two tables:
DE Code
-------- ---------
id PK id PK
orig FK ref id code cod
Dest FK ref id code flag
flag
here the code tables have column flag entry as 0 or 1
Problem is if either one of orig and dest have flag entries as 1 or both have 1 i want to update the flag in DE table as 1 or else 0. Can i acheive that by using a query, Please help