SQL delete syntax with group by
Posted on 2013-01-21
I have a table that has four fields (Part_No, Qty, Price, DateEntered). I need to group on everything but DateEntered and I want to first get a select so I can run an insert statement into an archive table for all the records 'except' the max date entered for that grouped records.
Then I need to delete these records so I only end up with the grouped records with the max date entered.
Thanks for any help.