+ Reply to Thread
Results 1 to 8 of 8

Append data in one table

  1. #1
    Registered User
    Join Date
    03-13-2023
    Location
    Luxembourg
    MS-Off Ver
    365
    Posts
    25

    Append data in one table

    Hi everyone

    I have as raw data the three tables with a "00_" prefix. I want to process my data in three different steps with three different tables or queries:

    01_UNIFIED TABLE:
    All of the tables are appended in one single table or query, keeping the source table as a field for the data

    02_RESULT TABLE1:
    It focuses on Colors from the UNIFIED TABLE. There is only one Color per line, and its corresponding Supplier, InternalCode and SourceTable.

    03_RESULT TABLE2:
    It deletes duplicated records from RESULT TABLE 1 and keeps only Food, Color and InternalCode columns.

    Does anyone know how I can do this? Either with queries or with VBA

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,885

    Re: Append data in one table

    Are you willing to import your tables to Power Query and have the mashup take place there? I think it can be achieved with the unpivot functionality after appending each table. Once this has been completed and loaded to an Excel file, it can thenbe linked back to an Access DB if necessary
    Attached Files Attached Files
    Last edited by alansidman; 10-24-2023 at 04:00 PM.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    03-13-2023
    Location
    Luxembourg
    MS-Off Ver
    365
    Posts
    25

    Re: Append data in one table

    I often have tables that exceed the copy-paste limit from excel (65,536 cells). Since I want this process to be automatic, unfortunately this solution does not work for me

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,885

    Re: Append data in one table

    See if these work for you
    Unpivot your data
    Please Login or Register  to view this content.
    Remove Duplicates
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by alansidman; 10-25-2023 at 12:54 PM.

  5. #5
    Registered User
    Join Date
    03-13-2023
    Location
    Luxembourg
    MS-Off Ver
    365
    Posts
    25

    Re: Append data in one table

    It works but the database I am handling has too much data, too many tables with many columns, not always the same. I took your solution and adjusted it to what I have and unfortunately I get an error that says "Query is too complex" :/

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,885

    Re: Append data in one table

    Going back to Post 3. Power Query does not have a limit on the number or rows.

    With Ref to your latest post, have you considered that your schema may be faulty and you need to have a different layout of your tables to achieve your desired results. I don't know as I have no way of seeing your actual data.

    Maybe this white paper on the design of RDBMS may be helpful.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-13-2023
    Location
    Luxembourg
    MS-Off Ver
    365
    Posts
    25

    Re: Append data in one table

    The query has a limit of 50 SELECT procedures for a SQL code. The schema might be faulty, but the Access file comes directly out of a software with the information stored in this way and I have to work with it.

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,885

    Re: Append data in one table

    Good luck with finding a solution. I have nothing else to offer.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. how to use excel vba to append data to a word table
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-24-2021, 05:40 PM
  2. Append data, from Excel, to word table
    By ericbartha in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-07-2016, 11:29 AM
  3. Append new data from an Access Query to a table
    By cmorten82 in forum Access Tables & Databases
    Replies: 2
    Last Post: 11-10-2016, 12:20 PM
  4. Append Refreshed Data to the bottom of the table
    By MissLungen in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-06-2014, 09:38 AM
  5. append data into a table
    By JHL in forum Excel General
    Replies: 0
    Last Post: 01-09-2012, 10:49 AM
  6. Append data in foxPro table
    By Syed Haider Ali in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-25-2007, 06:04 AM
  7. How to Append the Data to the Master Table
    By Shiva in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-08-2005, 01:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1