Results 1 to 4 of 4
  1. #1
    mohanmoni is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2015
    Posts
    6

    Insert data from multiple tables into one table

    Hi,

    Need query to insert data from multiple tables into one table matching with column names.
    (Note: Column positions are not same in all the table, it's completely differ.
    Like... Table1 - Contactname, company, address, city, state, zip, country.


    Table2 - City, state, company, contactname, zip, country, address.

    Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Why are you duplicating data between tables? This is contrary to basic relational database principles.
    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.

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    you have to decide on the field/column names that are to be used for the final table - - and then you have to map the name variations to the final table names as part of the consolidation. The consolidation is nothing but Append Queries. But the order of the column/fields do not matter - only variations in their names. So set up AppendQueries and manually select the correct field to append into i.e. LName goes into LastName.... that sort of thing.....

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Okay, if this is a one-time exercise to consolidate multiple tables into one then as NTC notes, can append records. Use INSERT SELECT. Or if not too much data, copy/paste records - just have to make sure fields are in the same order.
    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.

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

Similar Threads

  1. Replies: 5
    Last Post: 12-01-2014, 11:31 AM
  2. Replies: 9
    Last Post: 03-25-2013, 02:30 AM
  3. Replies: 10
    Last Post: 12-13-2010, 11:49 PM
  4. INSERT INTO and UPDATE to multiple tables
    By lupis in forum Import/Export Data
    Replies: 6
    Last Post: 05-19-2010, 05:21 AM
  5. Replies: 8
    Last Post: 11-04-2009, 04:22 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