Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I am getting error like "MAPPING requires 2-column input" when i use the below script.
Product:
MAPPING LOAD
SellStartDate,
StandardCost
resident Product;
Load
OrderQty,
OrderQty * ApplyMap('Product',StandardCost,0) as SalesAmount
Resident SalesOrderHeader;
Can anybody look into this .Any help will be highly appreciated.
Regards,
Phani
Hi,
try it like this:
Product:
MAPPING LOAD
SellStartDate AS X,
StandardCost AS Y
resident Product;
Load
OrderQty,
OrderQty * ApplyMap('Product',<field name that you want to change from current table>) as SalesAmount
Resident SalesOrderHeader;
<field name that you want to change from current table> this is the current field from current table you wish to transform not the field from MAPPING TABLE.
Regards, Miha
Hi,
try it like this:
Product:
MAPPING LOAD
SellStartDate AS X,
StandardCost AS Y
resident Product;
Load
OrderQty,
OrderQty * ApplyMap('Product',<field name that you want to change from current table>) as SalesAmount
Resident SalesOrderHeader;
<field name that you want to change from current table> this is the current field from current table you wish to transform not the field from MAPPING TABLE.
Regards, Miha
Hi,
Thanks for your Message. Actually i want to calculate Sales amount by using Orderqty*standardCost but both fields are in different tables , and i don't want to join that two tables.I tried your code but getting the same error.
Thanks in Advance,
Regards,
Phani
You'll probably also need to name your mapping table something different than the resident table you're loading it from. Call it ProductMap, for instance.
I always, except "load inline", use distinct in mapping load. It would be:
ProductMap:
MAPPING LOAD DISTINCT
SellStartDate AS X,
StandardCost AS Y
RESIDENT Product;