Results 1 to 5 of 5
  1. #1
    Amadeus is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    3

    Comparing 2 columns against 2 other columns


    This may be a noob question, but how can you run a query comparing an ID number and a date against another table of ID numbers and dates?

    I have everything loaded and ready to go, can easily compare ID vs ID, but one of the tables has a couple dates only per ID (that we need) and the other table has a large amount of dates in there that we do not need.

    Basically, trying to match up two columns on the smaller table to two columns on a much large table.

    Thanks

  2. #2
    evander is offline Competent Performer
    Windows 7 Access 2003
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    206
    What results do you want for the match? Like which pair of ID and date can be found in the bigger table? You can use an outer join query. I'll include the details after you reply to this thread.

  3. #3
    Amadeus is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    3
    Thanks for responding. On the smaller table, the one that I need the info for, there's about 1400 ID's and Dates. On the larger table, there's over 300,000. I need to pull the info from the larger table onto the smaller one. Meaning weed out most of the 300,000. Each ID can have several dates on both tables.

    Basically, I have a list of ID's and Dates on a small table, need to make sure they exist on the larger one.

  4. #4
    Rhino373 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    65
    In Access, click on New Query in Design View. Click to add both the small table and large table. In one of the tables, click on the ID field and drag your mouse to the ID field in the other table creating a link. Do the same with the Date field. You'll have a 2 lines joining these tables. Now double click the astrick from the large table and click the exclamation point at the top of the screen to run it.

    This effectively says to give you everything from the large table where the ID and Date from both tables matches.

  5. #5
    Amadeus is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    3
    That worked! Thanks

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

Similar Threads

  1. Columns not being hidden
    By degras in forum Reports
    Replies: 3
    Last Post: 01-25-2011, 10:29 AM
  2. help with columns in report
    By bjsbrown in forum Reports
    Replies: 8
    Last Post: 06-14-2010, 09:17 PM
  3. How do I get more columns?
    By cowboy in forum Queries
    Replies: 2
    Last Post: 05-03-2010, 04:44 PM
  4. Columns in a Listbox
    By craigalaniz in forum Access
    Replies: 3
    Last Post: 01-07-2010, 01:11 PM
  5. Adding Two Columns
    By arthura in forum Queries
    Replies: 6
    Last Post: 05-01-2009, 08:38 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