Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

andreyfcdk91
New Contributor III

Linking tables in load script

Good day!

In my model i have three tables:

Sales, Delivery_points, Customers (Structure in attachment)

What i need? In load script make one table from these three, which much have following fields:

ChainConnection,

DeliveryPoint_id,

Nomenclature_id

Дата,

YearMonth,

Количество шт.

Tell me please, how to make it?

Thanks.

4 Replies

Re: Linking tables in load script

Use Join statement to join them into one.

Table:

LOAD *

FROM Sales;

Join(Table)

LOAD *

FROM Delivery_points;

Join(Table)

LOAD *

FROM Customers;

sinanozdemir
Valued Contributor III

Re: Linking tables in load script

I am not sure how big your data is and cannot see your subset ration either, but you can try to join the table as follow:

Sales:

LOAD

.

.

.

Delivery_points

Left Join(Sales)

LOAD

.

.

.

Customers

Left Join(Sales)

LOAD

.

.

.

Hope this helps

chandan_chakrab
New Contributor

Re: Linking tables in load script

Hi,

Before joining tables we must consider

What type of relationship exists between two tables (one to one,one to many,many to one,many to many). I guess relationship between "sales" and "delivery points" is many to many as multiple customers can share same delivery point and on the other hand multiple sales occur in same delivery point. So be cautious while connecting sales with delivery points table by left join as it will increase number of rows of left table(sales).

Arjunarao
Honored Contributor II

Re: Linking tables in load script

Hi Андрей Шепель

Try like this.

Sales:

LOAD DeliveryPoint_id,

     Дата,

     Nomenclature_id,

     YearMonth,

     [Количество шт.]

FROM

Book1.xlsx

(ooxml, embedded labels, table is Sales);

JOIN (Sales) // left join (Sales)

Delivery_points:

LOAD DeliveryPoint_id,

     Customer_Id

FROM

Book1.xlsx

(ooxml, embedded labels, table is Delivery_points);

JOIN (Sales) // left join (Sales)

Customers:

LOAD Customer_Id,

     Customer_Id_EDI,

     [Количество шт. OCHOBHON],

     ChainConnection

FROM

Book1.xlsx

(ooxml, embedded labels, table is Customers);

1.PNG

2.PNG

3.PNG

Community Browser