I need your help plz.
- I have 2 tables. "Invcom09" and "itemdyn".
- The key is "noitem" (I mean I use this field for my query but I don'r have a key, it
doesn't matter for this query).
- There can be more than one order for the same noitem. This mean I have more than one row
for each noitem.
What I need to get is the row for the ultimate date FOR EACH ITEM (sorry for the caps...).
Here's my query:
select itemdyn.noitem, max(datecomm), price;
where itemdyn.noitem = invcom09.noitem;
and itemdyn.noitem between "DY-98-02" and "DY-98-06" group by 1
As You can see. this is only as an example.
What I get is the ultinate date for each item (this is Great!) BUT I don't get the right
price that match with my ultimate date.
I hope you'll be able to help me, Thanks