Tom,
Try (assuming that 'act_dt' is unique per 'id')
SELECT id, act_dt, col3, col4 ;
FROM tbl t1
WHERE act_dt = (SELECT MAX(act_dt) FROM tbl t2 WHERE t1.id = t2.id)
>I need to do a SQL SELECT that keeps the ID and I need the last action date. The code to do that is as follows:
>
>SELECT id, MAX(act_dt) FROM tbl GROUP BY id
>
>OK, so far no problem. However, what if there are 10 action dates per ID and I also need to keep two more columns? That is, I need the exact values for the other two columns that correspond to the same row that is on the MAX(act_dt).
>
>How can I be sure that I am getting say row 8 as the MAX date and the other two columns associated with that MAX date are also from the same row 8 not row 1 or 4 or 10?
--sb--