Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jasmina_karcic
Creator III
Creator III

How to solve a sintetic key?

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

1 Reply
petter
Partner - Champion III
Partner - Champion III

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.

   ....

;