Thanks, you got me on the right track. I ended up with the following:
(
select
A1.item_key,
A1.trans_date,
MAX(A1.effective_date) Effective_date
from
(
select
price.item_key,
trans.trans_date,
price.effective_date,
from
price,
trans
where...
Thanks, you got me on the right track. I ended up with the following:
(
select
A1.item_key,
A1.trans_date,
MAX(A1.effective_date) Effective_date
from
(
select
price.item_key,
trans.trans_date,
price.effective_date,
from
price,
trans
where...
It is a little more complicated than that. In the case of a price table with 4 prices for each item, with a different effective date for each price, your suggestion would return 4 rows for each transaction. I am trying to narrow the result down to one row for each transaction, showing the...
I have two tables, one that contains an item key, an effective date, and a price and a second table that contains an item key and a transaction date. I would like to create a query that would join the tables to show
item key
transaction date
price (where the effective date is less than the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.