2-criteria query; 2nd criteria not regular

  • Thread starter The Mysterious J
  • Start date
T

The Mysterious J

I have a query I need to match based generally on the criteria "reporting
unit" (RU) - an alphanumeric value. The RU is used to identify the "subunit".
All but one RU have only one subunit they are associated with. For just one
RU, there is a second criteria - procedure code. This is a numeric value,
but is typically a number stored as text. Based on procedure code, this
single RU has multiple subunits. I can only think to run 2 queries
separately, then join their results into a new table. Is there a way to
identify subunit in a single query for all data? If I leave "procedure code"
blank for all other rows in the "subunit" crosswalk, since all other RUs also
have procedure codes, the query dumps all other RUs and only sees the rows
with the RU with multiple subunits.
 
J

Jerry Whittle

Show us the SQL. Open the query in design view. Next go to View, SQL View
and copy and past it here. Information on primary keys and relationships
would be a nice touch too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top