Results 1 to 3 of 3
  1. #1
    hsduk101 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2017
    Posts
    2

    3 tables - force entries for first 2 tables to be outputted and then any values from table 3

    All,

    I have 3 tables

    Table 1 - Contains single column called routes: i.e. A,B,C,D,E,F etc


    Table 2 - Contains single column called Job Code i.e. 1,2,3,4 etc

    Table 3- contains the values, if there is any for the above 2 tables. it has 3 columns: Route, Job Code, and Value i.e A , 2, 345

    There is a hierarchy to these tables. Each Route, will have every single job code

    I want to write a query combining all 3 tables. However even though table 3 might not have any entries for any of the combinations for Tables 1 and 2. I want the query to force all combinations of tables 1 and 2 to be outputted and then a 0 for any nulls

    Help required many thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    in a query, bring in Tbl1 & Tbl2
    do not join them
    bring down the fields from both
    add extra field : 0

    run query

  3. #3
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by ranman256 View Post
    in a query, bring in Tbl1 & Tbl2
    do not join them
    This is called a Cartesian Join (if you want to read about it http://www.dba-oracle.com/t_garmany_...cross_join.htm )

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

Similar Threads

  1. Replies: 7
    Last Post: 09-25-2017, 06:59 AM
  2. Replies: 11
    Last Post: 03-13-2014, 09:54 AM
  3. Replies: 4
    Last Post: 10-28-2011, 12:49 PM
  4. Replies: 12
    Last Post: 12-05-2010, 09:01 PM
  5. Replies: 8
    Last Post: 05-25-2010, 04:50 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