Re: [SQL] Deleting obsolete values

2001-10-23 Thread Pat M
Delete from partitur where userid NOT IN (SELECT DISTINCT ON (userid) userid, val, ts FROM partitur) "Haller Christoph" <[EMAIL PROTECTED]> wrote in message 200110161445.QAA11833@rodos">news:200110161445.QAA11833@rodos... > This may look familiar to you - it was on the list last month. > Consider

Re: [SQL] Deleting obsolete values

2001-10-18 Thread Henshall, Stuart - WCP
DELETE FROM partitur WHERE EXISTS (SELECT * FROM partitur AS ss_partitur WHERE ss_partitur.userid=partitur.userid AND ss_partitur.ts>partitur.ts); Seems like it should seems like it should delete all old values (however I have not tested it) - Stuart > -Original Message- > From: Haller Ch

[SQL] Deleting obsolete values

2001-10-16 Thread Haller Christoph
This may look familiar to you - it was on the list last month. Consider the following table create table partitur (userid text, val integer, ts timestamp DEFAULT NOW() ); Do some inserts insert into partitur values('Bart', 1440); insert into partitur values('Lisa', 1024); insert into partitur