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

Can we Link tables with different column names ?

Hello,

In qlikview if the two tables column name is same then system will automatically create a link then what about if the two tables has different column names but the data is same ?

Assume below are the two tables and below of them are column names:

Sales(table):

Product_key,

sales_id,

customer_id,

sale_Date,

amount,

qty

Product(table):

Product_id,

Product_name,

Mfg_Date,

Product_type,

Color

The above two tables has column name called product_id(from product table) and product_key(from sales table). Logically both are connected but if we load these 2 tables

system will not auto link these tables due to different names.

Could any one please tell me how to connect these 2 tables with out changing the column names ?

Thanks in Advance,

Charan.

2 Replies
felipedl
Partner - Specialist III
Partner - Specialist III

Hi Charan,

You would still need to rename some field to match the other one in different tables, thats how View makes the association.

Since you don't want to rename the existing fields, you could copy and create a key for both of them, something like the below load statements:

Sales(table):

Product_key,

Product_key as ProdLink,

sales_id,

customer_id,

sale_Date,

amount,

qty

Product(table):

Product_id,

Product_id as ProdLink,

Product_name,

Mfg_Date,

Product_type,

Color

This would maintain your original fields and create a link. You would be duplicating the data though.

Felipe.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

See here: Can we link 2 tables with different column names with out renaming column name ?

Please don't post the same question multiple times. We can all see your first post in the General Overview. You can always bump your question if it drops off the general list.