Results 1 to 2 of 2
  1. #1
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875

    Query for All Possible Combinations

    Hey all, it's me again!

    I have two Tables, each containing completely different styles of data: One containing Firefighter names, and one containing possible Duties.

    How can I build a Query to give me a list of every possible combination of Firefighters/Duties?

    For example: I have the following:

    Firefighters:
    Code:
    FFID|Firefighter
    1|Rawb
    2|TheShabz
    Duties:
    Code:
    DutyID|Duty
    1|Driver
    2|Salvage
    3|Hose Operator
    How could I come up with the result:


    Code:
    FFID|DutyID
    1|1
    1|2
    1|3
    2|1
    2|2
    2|3

  2. #2
    jzwp11 is offline VIP
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Just bring the two tables together in a query with no joins between the two tables. This will give you the Cartesian Product between the two tables

    SELECT FFID, DUTYID
    FROM Firefighters, duties

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

Similar Threads

  1. Multi-Query List Box Combinations?
    By BizIntelGuy in forum Access
    Replies: 3
    Last Post: 07-20-2010, 03:20 PM
  2. Replies: 5
    Last Post: 05-26-2010, 07:13 AM
  3. ms access version combinations
    By marianne in forum Access
    Replies: 1
    Last Post: 08-05-2009, 07:37 AM

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