
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to specify key field in load statement
Hello,
Is it possibile to specify the key field in the load statement of the table?
I don't want that Qlikview automatically set the key fields for the table loaded in the script
Regards
Oronzo
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not as such no, QlikView considers a field named exactly the same in 2 or more tables to be a key. This is because of how QlikView's underlying engine stores data. You can used the Qualify statement to make all fields unique and then the Unqualify statement to specify the fields you want to make a key. You still need to make sure its named the same in both tables though.

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The keys will be set by puting the same field name on 2 tables. Ex:
Table1:
LOAD fieldA, field1 from table;
inner join (Table1):
LOAD field2 as fieldA, field3 from table;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
so if I have 2 table with same field I cannot specify the key field for one of this table?
Regards
Oronzo

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Qlikview use just the name of the field for linking. When ever you want the fields to be linked use the same field name , other wise use seperate field names. As qlikuser14 illustrated you can use 'AS' keyword to alter the field name.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not as such no, QlikView considers a field named exactly the same in 2 or more tables to be a key. This is because of how QlikView's underlying engine stores data. You can used the Qualify statement to make all fields unique and then the Unqualify statement to specify the fields you want to make a key. You still need to make sure its named the same in both tables though.
