The revolutionary project management tool is here! Plan visually with a single glance and make sure your projects get done.
SELECT t_Dtail.ItemID, Max(t_Dtail.tdate) AS MaxDate FROM t_Dtail WHERE (((t_Dtail.ActiveYN)=True)) GROUP BY t_Dtail.ItemID;
select a.* from t_dtail as a inner join (select max(b.tdate) as maxtdate, b.itemid from t_dtail as b group by b.itemid,b.ActiveYN having b.ActiveYN= true ) as c on a.itemid = c.itemid and a.tdate=c.maxtdate