Results 1 to 2 of 2
  1. #1
    Esmatullaharifi is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2014
    Posts
    40

    Question Join the data of two tables using query


    Hi to every one.
    I have two tables with name of accone and the second with the name of acctwo. These two tables are same according to number of columns and also same according to data types and also same according to the column names just the data are difference and also one column (attribute) with the name of ID is same in both tables. Their is a primary key relationship (one-to-one) between these two IDs. I need a query that can combine the data of both of them and can be updated using query. I mean that data of first table and second table must become under one same column not two columns one for first table and second one for second tabel. (Don't ask me that why you use two tables with same attributes, because i need and i can't explain my need to you).

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    To join two tables via a query, you can create an INNER JOIN or create an OUTER JOIN using the LEFT or RIGHT keywords.
    http://www.w3schools.com/sql/sql_join_left.asp

    Another option may be to use a UNION.
    http://www.w3schools.com/sql/sql_union.asp

    It is likely you will need to use DAO to update and or append your records.

    General DAO info
    https://msdn.microsoft.com/en-us/lib...ffice.14).aspx

    Update Method
    https://msdn.microsoft.com/en-us/lib...ffice.14).aspx

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

Similar Threads

  1. Replies: 6
    Last Post: 11-19-2013, 01:38 AM
  2. Replies: 4
    Last Post: 02-12-2013, 12:54 PM
  3. Replies: 4
    Last Post: 01-24-2013, 12:11 AM
  4. inner join query with three tables.
    By fabiobarreto10 in forum Queries
    Replies: 2
    Last Post: 01-30-2012, 07:34 PM
  5. Join 4 Tables in 1 Query
    By sandlucky in forum Queries
    Replies: 5
    Last Post: 06-12-2011, 06:28 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