Results 1 to 3 of 3
  1. #1
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,046

    Need assistance with (I think) a simple query...

    Hello:



    I need some assistance with developing a query that pulls all (invalid states). I'm sure this is a simple SQL query but I just haven't been able to figure it out.

    Let me start by saying this thread is NOT about a "geography lesson"... I am merely using city/state relationships to illustrate dual-mapping. Please see attached JPG (same table is attached w/o field [COMMENT]).

    Background on *sample* data:
    - A value (e.g., "City") is repeated several times in the table.
    - A record is considered *valid* as long as there is only one (1) parent value (e.g., "State") for it.
    - For example, [CITY] = "Dallas" appears 3 times. This record is valid since all 3 state values = "Texas".
    - Alternatively, [CITY] = "San Diego" occurs 5 times. It is an invalid record since it does have two (2) parent values (twice "California" and 3 times "New York").

    Out of the 20 records, the query should return the following 4 (invalid) grouped records:
    1. Miami | Florida
    2. Miami | Georgia
    3. San Diego | California
    4. San Diego | New York

    What SQL would return these 4 values?

    Thanks
    skydivetom
    Attached Thumbnails Attached Thumbnails Dual_Mapping.JPG  
    Attached Files Attached Files

  2. #2
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,046
    Solved outside this forum.

  3. #3
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Posting the solution here could help somebody with a similar problem later.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Assistance with query
    By LWOLF in forum Access
    Replies: 10
    Last Post: 05-24-2016, 05:12 PM
  2. simple assistance needed
    By gkaro in forum Access
    Replies: 4
    Last Post: 10-17-2013, 11:41 AM
  3. Query and report assistance
    By POS120 in forum Queries
    Replies: 1
    Last Post: 03-18-2012, 04:48 PM
  4. Assistance in form/query
    By abodi in forum Forms
    Replies: 1
    Last Post: 09-19-2011, 03:30 AM
  5. Query Assistance Needed
    By elotromanuel in forum Queries
    Replies: 1
    Last Post: 03-17-2009, 09:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums