1 Reply Latest reply: Aug 23, 2018 3:18 AM by Petter Skjolden RSS

    How to solve a sintetic key?

    Jasmina Karčić

      Hi experts,

       

      I need a little help with a sintetic key.

       

      If I need to fields for matching columns, because I don't have column with unique values, how can I make it, to avoid a sintetic key?

       

      Thanks a lot.

       

      Jasmina

        • Re: How to solve a sintetic key?
          Petter Skjolden

          You create a composite key of the two common columns and do an autonumber of this key in both tables and give it the same name:

           

          TABLEA:

          LOAD

               AutoNumber( Col1 & '|' & Col2 , '%A_B') AS %A_B,

               Col1,

               Col2,

             ....

          ;

           

          TABLEB:

          LOAD

             AutoNumber( Col1 & '|' & Col2 , '%A_B') AS %A_B,

             // Col1,      // Be sure to comment out or delete the Col1 and Col2

             // Col2,      // from one of the two tables.

             ....

          ;