Re: Grouping behavior question

2001-11-01 Thread Anvar Hussain K.M.
Hi Mr. Jerry, Since Mysql does not support sub query, you will have to use temporary table instead. Create temporary table tmptbl1 Select keycol, Max(datetimecol) as maxdate from detailtable group by Keycol; Create temporary table tmptbl2 Select distinct T.Keycol, D.Status from tmptbl1 T, de

Grouping behavior question

2001-11-01 Thread Jerry van Leeuwen
I often find myself in the following situation: I have a master table and a detail table, the detail table contains chronologically ordered items (statuses) that relate to the master record. I now need to display one line for each of the master records with the latest status from the detail t