Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two tables one in Txn table where i have itemid, barcode, Saledate, Qty.
In another table I have barcode, fromdate, todate, MRP. in this table barcode is not unique. and i don't have continuous dates against the MRP. table has 1000000+ rows from last 10 years . If i am trying to generate dates in this table taking too much time.
Please help me out to calculate the Sales value.
Sales value=qty*MRP
Thanks,
Lalit Kumar
Check for IntervalMatch function..
Sales:
Load itemid, barcode, Saledate, Qty from....
barcode:
Load barcode, fromdate, todate, MRP from...
Inner Join
IntervalMatch(Saledate, barcode)
Load fromdate, todate, barcode resident barcode;
Left join (Sales)
Load * Resident barcode;
drop table barcode;
drop fields fromdate, todate;
we can results using Interval match concept.
Please try according to below script; and try to load few rows using DEBUG option and run.
if you didn't got the results.please share the sample data files
thanks
MRP_table:
Load barcode, fromdate, todate, MRP from...
Txn_table:
Load itemid, barcode, Saledate, Qty from....
Intevaltable:
IntervalMatch(Saledate)
left Join(Txn_table)
LOAD fromdate,todate
Resident MRP_table;
left join(Txn_table)
load * Resident MRP_table;
drop table MRP_table;