Looking for solution with update query

  • Thread starter Thread starter Eric Wade
  • Start date Start date
E

Eric Wade

Here's the scenario:

Have a table with many loans (mortgage), I have a query
that based upon certain criteria will have a field in the
table that gets marked "Yes/No" depending. The problem
however is that there are multiple loan #'s (meaning same
loan #'s in there, that have different criteria). If one
of the loans gets marked yes, all of the other loans with
the same loan #, need to be marked as yes as well. I
can't figure a good solution to do this using update
queries. If I'm looking in the wrong area, please point
me in the write direction. If you need more information
let me know and I will provide. Thank you in advance.
 
There may a number of different ways of doing this but generally, you will
need a Query with a SubQuery using the IN operator or the EXISTS clause.

Something like:

UPDATE YourTable
SET SomeField = True
WHERE LoanNo IN
(
SELECT LoanNo
FROM YourTable As T2
WHERE T2.SomeOtherField = {some criteria}
)

Check the keywords IN (operator) and EXISTS in the JET SQL Reference in
Access Help.
 
Back
Top