Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change keys in tables?

Hi, I met this problem. I connect thru ODBC to the data source and load 3 tables from Pervasive SQL. I have a proper ODBC driver. When I import data to the new Qlik document, Qlik makes connections between tables and use field names for that. 

For example: I have two tables Employees and Departments. In both I have the field "Address" and in Employees field "ID_employee" and in Departments "ID_empl". Qlik makes connection using "Address", but I need to use "ID_employee" and "ID_empl". I use "ID_empl" as "ID_employee" in data input script now, but it is a workaround I think.

Can I change this? For example to set in Qlik that key is not "Address" but those two IDs.

Thank you for any answer.

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    The way Qlikview joins two table, is field with same name.

    So make sure that the fields through with you want to make join in tables have the same name and the rest of the fields have distinct name.

    So in your case, the way you did is the correct way, but you need to change the name of one of the address field to something else.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
SunilChauhan
Champion
Champion

address should not be a key. please rename this .

writing in script

ID_empl as ID_employee

mak link between Departments table and Employees table.

and your can get proper data based on ID_employee from both table.

check both ID_employee shoould be of similar data .

Sunil Chauhan