Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load from in Script

Hi all,

I'm trying to create a first vendor account number for each unit.

Below is my script,

trace ;

trace --- Customer ---;

LOAD VENDOR.C_COMPANY,

     VENDOR.ACCNO,

     %_VNO,

     %_C_GROUP,

     VENDOR.C_COMPANY_ORIG,

     VENDOR.C_NAME,

     VENDOR.CATEGORY,

     VENDOR.CATEGORY_USED,

     VENDOR.CATEGORYBUYER,

     VENDOR.REPNUMBER,

     VENDOR.REPNAME,

     VENDOR.C_GROUP,

////////////# Vendors per Reg////////////////

FirstSortedValue(VENDOR.ACCNO,UNIT.SOLD_DATE,1) as FirstVendor

    

    

FROM

[$(QVD_Path)\BUYER_customer.qvd]

(qvd);

I believe it's incorrect because UNIT.SOLD_DATE isn't in the same table, it is loaded from the Unit table before the Customer table. How do I get around this?

Thanks

Gareth

Labels (1)
3 Replies
tresB
Champion III
Champion III

If the tables are rightly linked with key field, you could use FirstSortedOrder() in the front-end in a chart. Otherwise, to do it in the script, you have to join the tables and bring it in the same table.

Anonymous
Not applicable
Author

Thanks for your response,

How would I join the tables?

Thanks

Gareth

Anonymous
Not applicable
Author

Hi,

Could you share the tables you need to join?

Thanks