Forum Discussion

thampton's avatar
thampton
Helper III
7 years ago
Solved

Appending issue

I have two tables, each with one row. When i try to append them and create a new table, it shows up as two rows. Column 1 is table one, and column 2 is table 2. 

 

Any ideas?

  • HI thampton,

     

    Not sure if I'm getting your issue correctly, you refer that you are appending 2 tables, so the final result is a single table with all the rows of the tables you are appending, if each of the tables have 1 row you will get 2 rows.

     

    Another thing to have in mind is that in order to make appends both table need to have the same name in colums if you have different names you will get adittional columns in your final table.

     

    Example:

     

    Both tables with same name columns

     

    Table 1  
    Column 1 Column 2
    A 1
       
    Table 2  
    Column 1 Column 2
    B 2
       
    Final Table
    Column 1 Column 2
    A 1
    B 2

     

    Both tables with different name columns:

    Table 1    
    Column 1 Column 2  
    A 1  
         
    Table 2    
    Column 1 Column 3  
    B 2  
         
    Final Table  
    Column 1 Column 2 Column 3
    A 1 null
    B null 2

     

    So you will get different results, what do you want to achieve?

     

    Regards,

    MFelix

4 Replies

  • PattemManohar's avatar
    PattemManohar
    Community Champion

    thampton Not sure whether you are looking for Append or Merge. Please post the sample data and expected output to understand your scenario.

    • thampton's avatar
      thampton
      Helper III

      PattemManohar I can not post because it contains sensitive data. I am using Append As New. I would like for the the two tables to merge in one column. 

  • HI thampton,

     

    Not sure if I'm getting your issue correctly, you refer that you are appending 2 tables, so the final result is a single table with all the rows of the tables you are appending, if each of the tables have 1 row you will get 2 rows.

     

    Another thing to have in mind is that in order to make appends both table need to have the same name in colums if you have different names you will get adittional columns in your final table.

     

    Example:

     

    Both tables with same name columns

     

    Table 1  
    Column 1 Column 2
    A 1
       
    Table 2  
    Column 1 Column 2
    B 2
       
    Final Table
    Column 1 Column 2
    A 1
    B 2

     

    Both tables with different name columns:

    Table 1    
    Column 1 Column 2  
    A 1  
         
    Table 2    
    Column 1 Column 3  
    B 2  
         
    Final Table  
    Column 1 Column 2 Column 3
    A 1 null
    B null 2

     

    So you will get different results, what do you want to achieve?

     

    Regards,

    MFelix

    • thampton's avatar
      thampton
      Helper III

      MFelix Thank you! I had an extra space in one of the column headers so they were different; After changing, it worked.