Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jananireddy
Partner - Creator
Partner - Creator

Where Condition from another QVD

Hi Guys,

My current script in the data load editor looks like this

LOAD * FROM [lib://QVD/Loans.QVD] (qvd) ;

.

.

.

.

LOAD * FROM [lib://QVD/Product.QVD] (qvd) ;

What i want to do is add a where condition in my products data to load only the products present in Loans .. These two are linked by "Product" column and this logic can be achieved like this


Load * from Product

where Product in (Select Product from Loans)



How can i do this in my QVD script?

1 Solution

Accepted Solutions
mdmukramali
Specialist III
Specialist III

Hi,

LOAD * FROM [lib://QVD/Loans.QVD] (qvd) ;

LOAD * FROM [lib://QVD/Product.QVD] (qvd)

Where Exists(Product );


but make sure to load Product table after Loans table.



View solution in original post

8 Replies
Anonymous
Not applicable

  1. Load the full qvd file,
  2. use resident and drop the qvd table
jananireddy
Partner - Creator
Partner - Creator
Author

Hi Hari, I did so but i was unable to get what i wanted. Can you elaborate with the script please

mdmukramali
Specialist III
Specialist III

Hi,

Use

Where Exists(Product );



mdmukramali
Specialist III
Specialist III

Hi,

LOAD * FROM [lib://QVD/Loans.QVD] (qvd) ;

LOAD * FROM [lib://QVD/Product.QVD] (qvd)

Where Exists(Product );


but make sure to load Product table after Loans table.



OmarBenSalem

try sthing like this:

Loans:

LOAD ..., Product as ProductLoan FROM [lib://QVD/Loans.QVD] (qvd) ;

Products:

LOAD * FROM [lib://QVD/Product.QVD] (qvd) ;

Final:

Load Product as ProductLoan , Address Resident Products where Exists (ProductLoan, Product );

Drop Tables Loans, Products;

jananireddy
Partner - Creator
Partner - Creator
Author

Thanks for the quick reply this worked

Anonymous
Not applicable

Loans: LOAD * FROM [lib://QVD/Loans.QVD] (qvd) ;

Product_Loan_Mapping: Mapping Load Product, 'Mapped' as Flag resident Loans;

Product_Temp:

Load *, ApplyMap('Product_Loan_Mapping', Prodcut, 'N/A') As Mappings;

LOAD * FROM [lib://QVD/Product.QVD] (qvd) ;


NoConcatenate

Product:

Load * resident Product_Temp where Product = "Mapped";

Anonymous
Not applicable

Drop table Product_Temp;