Results 1 to 7 of 7
  1. #1
    up4asmile is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    4

    query help - combining 2 tables with no common title heading

    Good afternoon,
    I am hoping someone will have an idea here how to make this work.
    I have one table with a column named "url"; I have another table with multiple "url" columns, named, url1, url2, url3, etc.
    The url column contains all of the ones that are inside the url1, url2, url3, columns. Is there anyway I can associate them? That is the only commonality between the 2 tables.
    I hope it isn't a lost cause. Thanks for your help.

  2. #2
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    Is the URL Data in both tables consistent or are there more occurences of one than the other. If you create a query and add both tables to them. Click on URL and drag your mouse to the Other URL field. This will join the data. You can adjust how this is handled if you double click the line that appears after the mouse drag.

  3. #3
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,931
    struggling to visualise your structure, but it sounds like the table with multiple "url" columns is not normalised and I don't understand 'The url column contains all of the ones that are inside the url1, url2, url3, columns' - Can you provide some examples of what you mean (not descriptions)

    e.g.
    tbl1
    url
    http//1... http//2... http//3...

    tbl2
    url1........url2........url3
    http//1...http//2... http//3...

  4. #4
    up4asmile is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    4
    Thanks to you both. I think what you said, Perceptus, will work.
    Ajax, URL contains all of the urls. For URL1, URL2, URL3, each of the urls are broken out into separate columns.
    URL: http://www....570.htm http://www....423.htm http://www....1162.htm
    URL1: http://www....570.htm
    URL2: http://www....423.htm
    URL3: http://www....1162.htm
    Thank you both. I'm going to try that, Perceptus. That is common sense and I should have thought of it.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Sounds like will have to pull table with the single URL column into the query 3 times. Join one each to one of the multiple URL columns in the other table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    up4asmile is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    4
    I thought this would work, but it doesn't. Here's a screenshot:
    Click image for larger version. 

Name:	Capture.JPG 
Views:	6 
Size:	72.1 KB 
ID:	20443
    Basically, everything I need is inside the Monthly Advertising Query except for the number of visits. I made the relationships dependent so that it appears in both queries. (which makes sense to me). But I don't get any info with it set up this way.
    ???

  7. #7
    up4asmile is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    4
    Okay, my colleague told me to change the "and" in the relationship to "or" (using sql). That worked and I have my data. Thanks for your input! I appreciate it!

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

Similar Threads

  1. Replies: 3
    Last Post: 01-15-2014, 02:41 PM
  2. Replies: 6
    Last Post: 09-01-2013, 08:17 PM
  3. Query Two tables based on common value
    By mhankins in forum Queries
    Replies: 1
    Last Post: 03-12-2013, 09:57 AM
  4. Replies: 7
    Last Post: 03-08-2013, 03:58 PM
  5. Combining Tables by Query
    By jlclark4 in forum Queries
    Replies: 9
    Last Post: 01-25-2011, 12:19 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