Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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.
Hi Hari, I did so but i was unable to get what i wanted. Can you elaborate with the script please
Hi,
Use
Where Exists(Product );
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.
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;
Thanks for the quick reply this worked
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";
Drop table Product_Temp;