Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
How would I go about using two tables in the script to compare 2 different fields? Something like the following:
if(match(Table1Field1,Table2Field1),Table2Field2) as Field
i.e. how would I code the loading of the resident tables and such to get this to be able to work?
Regards,
Brandon
Hello,
You can do this using mapping concept. For example
Table1:
LOAD CustomerID,
CustomerName
Address,
CustomerCode,
ZipCode,
City,
Country,
FROM Customers.qvd (qvd);
Map1:
MAPPING LOAD CustomerID,
CustomerID
as CID
RESIDENT Table1;
Table2:
LOAD InvoiceID,
Date,
CID,
ApplyMap('Map1', CID, Null()) AS CID1
FROM Invoices.qvd (qvd);
Hope it helps you
Hello,
You can do this using mapping concept. For example
Table1:
LOAD CustomerID,
CustomerName
Address,
CustomerCode,
ZipCode,
City,
Country,
FROM Customers.qvd (qvd);
Map1:
MAPPING LOAD CustomerID,
CustomerID
as CID
RESIDENT Table1;
Table2:
LOAD InvoiceID,
Date,
CID,
ApplyMap('Map1', CID, Null()) AS CID1
FROM Invoices.qvd (qvd);
Hope it helps you
Wonderful! Thank you, thats very helpful!