
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
set primary key on loaded table
Hi all,
I'm new to QlikView,
is it possible to set a field explicitly as primary key on a loaded table in order to make an association with another table?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For making joins between tables you need to give the field the same name in both the tables and QlikView will itself form the association. For instance:
Table1:
LOAD xyz,
Date
FROM someTable.xlsx;
Table2:
LOAD xyz,
Year
FROM anotherTable.xlsx
These two tables will automatically show a association on the field XYZ.
HTH
Best,
S

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For making joins between tables you need to give the field the same name in both the tables and QlikView will itself form the association. For instance:
Table1:
LOAD xyz,
Date
FROM someTable.xlsx;
Table2:
LOAD xyz,
Year
FROM anotherTable.xlsx
These two tables will automatically show a association on the field XYZ.
HTH
Best,
S

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the above explanation is absolutely right,
if ur case is like this then u can try the below one,
Table1:
LOAD xyzaaaa as Key1,
Date
FROM someTable.xlsx;
Table2:
LOAD xyz as Key1,
Year
FROM anotherTable.xlsx


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi stefno,
above examples is right.. In qlikview if u want to do assosiation between 2 table simply alias field to common name.
For Ex:-
Student:
LOAD RollNo as Key1,
StudDate
FROM Student.xlsx;
Mark:
LOAD SRN as Key1,
Marks
FROM Marksheet.xlsx
Regards,
Mukesh Chaudhari


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One more way when you have more that one column with the same name:

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The bottom line is that QlikView doesn't care about which the primary key is. The only thing that matters, is what the name of the field is. If it is the same in two tables, it's a key. Full stop.
So make sure that
- you name keys the same in different tables.
- you name non-keys differently in different tables (e.g. fields like Comment, Remark, and Description)
HIC
