Originally Posted by
June7
If all filter criteria cannot be incorporated into one WHERE clause, then need separate queries. Will OR work for your situation?
WHERE (ProgramNew.GW1 Is Null AND GWActivitySelection.GW="GW1") OR (ProgramNew.GW2 Is Null AND GWActivitySelection.GW="GW2") OR ...
Why save calculated data? Saving calculated data (data that is dependent on other saved values) is usually, at best, unnecessary, or, at worst, dangerous. If values can be calculated for an UPDATE, they can be calculated whenever needed.
Also, it appears data structure is not normalized. Multiple similar name fields (GW1 through GW8) storing the same type data is an indicator of non-normalized structure.
If you want to provide database for analysis, follow instructions at bottom of my post.