Results 1 to 3 of 3
  1. #1
    escuro19 is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2009
    Posts
    2

    Joining or Combining Two tables

    Hi,

    I spend alot of time trying to work this out but failed so please could
    someone help.

    Data:
    (this table the intDay varies depending on the person)
    Table1
    Person | intDay
    1 | 22
    1 | 23
    1 | 24
    1 | 25
    2 | 14
    2 | 15
    2 | 16
    2 | 17

    And below is the data which i want to combine with the table above. (the data
    range always starts at 8 and -7 and should continue depending on how many


    inDay a person have)

    (data range/scale)
    +day | -day
    8 | -7
    9 | -6
    10 | -5
    11 | -4
    12 | -3
    13 | -2
    15 | -1
    16 | 0
    17 | 1
    18 | 2

    This is what i want the output to be(output to a table or report format):

    Person | intDay | +day | -day
    1 | 22 | 8 | -7
    1 | 23 | 9 | -6
    1 | 24 |10 | -5
    1 | 25 | 11 | -4
    2 | 14 | 8 | -7
    2 | 15 | 9 | -6
    2 | 16 | 10 | -5
    2 | 17 |11 | -4

    So basically for each person in the table, 'the data range/scale' matches
    with it. And also is it possible to stop matching once the Person's intday
    stops.

    Thankyou for your help
    Last edited by escuro19; 11-12-2009 at 08:54 AM.

  2. #2
    NassauBob's Avatar
    NassauBob is offline Not THAT Green
    Windows XP Access 2003
    Join Date
    Feb 2010
    Location
    Augusta, GA
    Posts
    61
    In order for Access to successfully join these two tables, they will need a common attribute to join on, or you will end up with this big, hairy Cartesian beast.

    Are the tables related at all? Or could you add a Person field to the second, and have it correspond to the first table?

  3. #3
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    Also, Access is a relational database. I see no keys nor anything that is common between those tables to relate to each other. Without those, you're using Access as a really overpowered Excel. If you could tell us how the second table is related to the first, that would help. Looking at your goal, what is it about "Person | intDay" that assigns a particular "+day | -day" to it?

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

Similar Threads

  1. Combining Tables
    By king_bowzow in forum Queries
    Replies: 0
    Last Post: 08-05-2009, 10:15 AM
  2. Joining Unioins output to tables? Help Needed
    By techexpressinc in forum Queries
    Replies: 4
    Last Post: 06-24-2009, 05:05 PM
  3. Joining tables two tables and another table that is not
    By DevintheDude in forum Database Design
    Replies: 0
    Last Post: 09-12-2007, 08:56 AM
  4. Replies: 1
    Last Post: 06-03-2006, 05:02 PM
  5. Help combining 3 tables
    By luscioussarita in forum Queries
    Replies: 1
    Last Post: 12-14-2005, 03:22 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