Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use field from another table as key

Hi all.

I need to create a key with to fields but they are from two differnt tables. The key should be with Date and lWorkstationNmbr but lWorkstationNmbr are from tha table Data.xlsx. Have the following script that doesn't work, any suggestions have to solve this?

WN:

LOAD DISTINCT

     TransactionID2,

     DateTime,

     Date,

     tp5kTime,

     StoreID,

    p5IWorkstationNmbr,

    lWorkstationNmbr&Date as TP_Key,

     p5kWorkstationName,

     ProductCategory,

     OperatorID

FROM

(biff, no labels, table is Sheet1$);

Right Join(WN)

LOAD lWorkstationNmbr,

     p5WorkstationNmbr

FROM

C:\Sales_Import\Data.xlsx

(ooxml, embedded labels, table is SALES);

10 Replies
DavidFoster1
Specialist
Specialist

Also you need to put your SQL thinking aside. Load scripts are sequential loading processes not queries. In your script the process reads as

1) Load WN*.XLS (dataset a)

2) Load Data.XLS (dataset b)

3) RIGHT JOIN dataset a and b

If you wanted to work with what you have you could have loaded into a temp table WN_tmp and then done a RESIDENT load into a final table with the final Key.