I have 2 tables, Price (Date, Price, SiteID) and Transaction (Account, Date, Site, Quantity). Price is updated periodically as changes occur, could be many days between changes. Transactions can occur many times a day.
I need a query to match the transaction with the price for the date and site of the transaction, grouped by account then site.
I'm stuck getting the right price for the right date since there may not be a matching date in the price table. Can anyone suggest a solution?
Thanks, Bear
I need a query to match the transaction with the price for the date and site of the transaction, grouped by account then site.
I'm stuck getting the right price for the right date since there may not be a matching date in the price table. Can anyone suggest a solution?
Thanks, Bear