Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All ,
I have two tables in my Load script . Which is making the link using 'Customer ID' Now Table A has lots of data ,
But i want to load only that data whiere the CutomerID of Table B matches with the Customer ID of Table A .
How can I achive this ? I know i can use where function and need to specify manaul entries of the Customer ID's which is a headache.
Please suggest how can I make this automated.
Table A:
Load
Department,
Section,
Sales,
ID,
Region,
Customer_ID
From......
Table B:
Load
Business,
Products,
Parcels,
Category,
Customer_ID,
From....
Thanks in advance
in that case just load table B first and then Load Table A with where exists()
TableB:
LOAD CustomerID,
ITComp,
Are,
Sales,
Gravity
FROM [C:\APP\TestData.xlsx] (ooxml, embedded labels, table is Sheet4)
;
TableA:
LOAD CustomerID,
Deoartment,
Product,
Region,
Incometx,
FloorID
FROM [C:\APP\TestData.xlsx] (ooxml, embedded labels, table is Sheet1)
where exists(CustomerID);
use exists() function in where clause. this also keeps the optmized load.
Exists - Skriptfunktion ‒ QlikView
A:
Load
Department,
Customer_ID
B:
Load
A,
B,
Customer_ID
where exists(Customer_ID)
I am confused ..
I have so many fields in Table A how can i write ur sript example ?
just add this line in the second load Statement.
where exists(Customer_ID)
if you want to check more fields go like
where exists(Customer_ID)
and exists(Department)
Thanks for the reply
PLease find the attachment of the QVW.
I want to keep my table and the fields as it is .
In tableA there are 26 Customer ID and in Table 2 there are only 9 customer ID .
I want to load Table A data related to only 9 Customer ID's of Table B .
Thanks
in that case just load table B first and then Load Table A with where exists()
TableB:
LOAD CustomerID,
ITComp,
Are,
Sales,
Gravity
FROM [C:\APP\TestData.xlsx] (ooxml, embedded labels, table is Sheet4)
;
TableA:
LOAD CustomerID,
Deoartment,
Product,
Region,
Incometx,
FloorID
FROM [C:\APP\TestData.xlsx] (ooxml, embedded labels, table is Sheet1)
where exists(CustomerID);