sql - Access - Filter on query only records matched in a subquery -
i have data on query, call query1, has key, named auth, query1.auth. query, query2, has different - similar - data, auth key well, query2.auth.
what wanted was, filter query1 based on matched results query2. however, there nuance, need filter results match (actually, might filter them, based on condition), whilst leaving remaining, non-matched, intact.
to make bit more clear, query1 has structure similar to:
<auth> <some field> <begin date> <end date> whilst second query, query2, like
<auth> <reg date> so idea is, grab results query2 match on query1 (based on auth, left join), matched records, remove query2.[reg date] > query1.[begin date] + 360 , query2.[reg date] < query1.[begin date] (and condition). , leave remaining records of query1 untouched, meaning, don't match.
Comments
Post a Comment