Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
You are running the script which doesn't have PInstallTeam feild from particular dataset.
For eg:
I've data in my dataset
A B C
If i want to load this dataset in qvw. I can use the code as,
Load A,B,C
From dataset;
But if i use the below code, it show the error. B' coz D,E fields are not existing in the datset.
Load A,B,C,
D,E
From dataset;
Thanks Jagan - I have the logic and I know why it is showing the error. My question is how do I load the PInstallTeam into the existing data table from another one so I can run my IF statement.
First you should have a common key between two tables. With help of common key we can combine two tables. There are different number of ways to combine the two tables, it all depends on the data what we want. From the combination of two tables we can make a calcualation.
For eg:
Table1:
Load key, A,B,C from Dataset1;
Left Join (Table1)
Load key,D,E from Dataset2;
Load key,
If(IsNull(C),A,E) as NewField
Resident Table1;
Hope it may helps you understand. Otherwise provide sample file with data. It helps me and others to solve the issue of yours.
I'm pretty sure it's the lookup command but can't figure it beyond there.
Hi,
Check the following example and adapt it to meet your needs:
Table1:
LOAD CustomerID,
CustomerName
Address,
CustomerCode,
ZipCode,
City,
Country,
FROM Customers.qvd (qvd);
// take all customer IDs and return codes
IDCodeMap:
MAPPING LOAD CustomerID,
CustomerCode
RESIDENT Table1;
// Replace empty CustomerID with Customer Code
Table2:
LOAD InvoiceID,
Date,
CustomerID,
If(Len(CustomerCode) = 0, ApplyMap('IDCodeMap', CustomerID, CustomerCode), CustomerCode) AS CustomerCode
FROM Invoices.qvd (qvd);
Hope that helps.
Miguel