>Sergey
>Thanks.
>I may have messed something up, but I'm getting two rows for each Sales Order
>I tried Naomi's and it works fine, so I'll use that one.
>Thanks again for your help.
Bill,
Sergey's code will work for you with this slight modification
SELECT t1.sono, t1.tcode, t1.tdate ;
FROM mytable t1 ;
WHERE t1.tdate = (SELECT MAX(tdate) FROM mytable t2 ;
WHERE t1.sosno = t2.sono)
However, it is a slower method comparing with the others and it doesn't eliminate duplicates if you have the same max dates.
If it's not broken, fix it until it is.
My Blog