Delete Question

From: Alex <alex(at)meerkatsoft(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Delete Question
Date: 2005-12-07 07:21:25
Message-ID: 43968D75.6020804@meerkatsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a table where I store changes made to an order. The looks like
ProdID, ChangeDate, Change1, Change2, ... etc.
Some ProdIDs have multiple records.

Is there an easy way to delete all records of a ProdID except the most
recent (ChangeDate is timestamp) one? Preferably in one SQL statement?

Thanks for any advise

Alex

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Emil Rachovsky 2005-12-07 07:26:01 Re: [SQL] lost in system tables
Previous Message A. Kretschmer 2005-12-07 06:28:26 Re: Winbashing