2 Replies Latest reply: Oct 24, 2011 5:08 AM by Anand Chouhan RSS

    Two or more columns between two tables!

      Hi

       

      Imagine there are two or more common columns between two tables. To avoid the sythetic key we may renamed the fields and join only the required keys. If two or more key need to be joined we will concatenate and create the key field. But in that case imagine if the millons of common rows are there between two tables then how can overcome this issue.

       

      I need all your suggestion on this.

       

      Thanks

       

      Attitude

        • Two or more columns between two tables!
          Erich Shiino

          Hi, Attitude

           

          Another approach, would be the concatenations of the tables.

          You can also include a flag to identify the source of you data:

           

           

          Table1:

          LOAD A, B, C, E, F, G,

          'Table1' as Source

          FROM ...;

           

          CONCATENATE(Table1)

          LOAD A, B, E, F, G, H, I, J,

          'Table2' as Source

          FROM ...;

           

          Hope this helps,

           

          Erich

          • Two or more columns between two tables!
            Anand Chouhan

            Hi,

             

            If there are same columns so you just concatenate the tables or other wise use Qualify command like

            Qualify *;

            and if you want some fileds not qualify so use unqualify that perticular field like

             

            Unqualify FieldName;

            Other wise concatenate the tables like

               

            Table1:

            load * ,

            'Table1' as TableSource

            From Data

             

             

            Concatenate(Table1)

            laod * ,

            'Table2' as TableSource

            From Data

             

            HTH

               

            Rgds

            Anand