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

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
sunny_talwar

Use Join statement to join them into one.

Table:

LOAD *

FROM Sales;

Join(Table)

LOAD *

FROM Delivery_points;

Join(Table)

LOAD *

FROM Customers;

sinanozdemir
Specialist III
Specialist III

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

Anonymous
Not applicable
Author

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).

qlikviewwizard
Master II
Master II

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