Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Join 2 field values to create a Primary Key?

For something like this, I have no unique primary key.

In the script, how would I combine these 3 fields together to create a sort of Primary key?

So it is "123Test1235:45"

Then I would use this key to check against new data to perform an incremental load.

Customer

NameTime
123Test1235:45
555Increment6:56
555Test123

4:20

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

You can use &

column1 & '|' & column2 & '|' & column3 as Primary key

But better is:

autonumber(column1 & '|' & column2 & '|' & column3)


Note replace column with your fieldnames


autonumber ‒ QlikView

View solution in original post

6 Replies
stigchel
Partner - Master
Partner - Master

You can use &

column1 & '|' & column2 & '|' & column3 as Primary key

But better is:

autonumber(column1 & '|' & column2 & '|' & column3)


Note replace column with your fieldnames


autonumber ‒ QlikView

Miguel_Angel_Baeyens

If every row is different, you could use functions like RowNo() or a simple iteration to assign a unique value to each record.

If you need to compare each value, then yes, what you suggest, used in combination with AutoNumber() or similar functions will help.

Anyway, how would you plan to do the incremental load? If all rows are unique, will they ever be replaced?

md_qlikview
Creator II
Creator II

Hi,

You may functions like RowNo() or Autonumber(Customer &'_'& Name Time) to unequally identify each record.

md_qlikview
Creator II
Creator II

I forgot to concatenate Time on previous reply.

Autonumber(Customer &'_'& Name &'_'& Time)

Not applicable
Author

Thank you!

Not applicable
Author

Thank you!