Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
What i am trying to do is get a price for a record where the sales order date is between two dates and where the Item Number and Customer Name match eg
SalesOrderTable:
Order Number | Item | Customer | Date |
---|---|---|---|
11111 | Product 1 | Customer 1 | 10/10/2014 |
PriceList:
Customer | Item | Start Date | End Date | Price |
---|---|---|---|---|
Customer 1 | Product 1 | 01/10/2014 | 31/10/2014 | £5 |
I have been trying to use interval match with no avail. Please note that the price needs to be joined to the record.
Thanks in advance
Ben
PriceList:
Load *,Item&Customer As Key Inline [
Customer,Item,StartDate,EndDate,Price
Customer 1,Product 1,01/10/2014,31/10/2014,£5 ];
SalesOrderTable:
Load *,Item&Customer As Key Inline [
OrderNumber,Item,Customer,Date
11111,Product 1,Customer 1,10/10/2014 ];
Join
IntervalMatch (Date,Key) Load StartDate,EndDate,Key Resident PriceList;
Left Join(SalesOrderTable)
Load Key,Price Resident PriceList;
Drop tables PriceList;