4 Replies Latest reply: Apr 18, 2017 10:05 AM by omar bensalem RSS

    Concatenate Tables

    Bradley Qian

      I have two tables, from File 1 and File 2, with the same columns. They are currently concatenated into the same table.


      However, I would also like to add a column with a 0 or 1 value to distinguish those from File1 and from File2. Any help with this would also be much appreciated.


      Thanks very much!!

        • Re: Concatenate Tables
          John Repucci

          What loads are you trying to concatenate?  You show three loads, but only one table name and there are no concatenate keywords in the 2nd / 3rd loads.


          It appears you are missing a FROM statement for table Fruits1

          There is a double comma following [Name1]


          To distinguish the different source files, I typically add a statement to each load such as this:

          'Fruits1"     AS Source,

          'File1'     AS Source,

          'File2'     AS Source

          • Re: Concatenate Tables
            omar bensalem



            *, 'Table1' as NewField


            From sourceTable1;


            concatenante // or don't, they automatically be



            *, 'Table2' as NewField


            From sourceTable2;


            With that, we create a new field in each table to distinguish.


            Hope this helps