Re: Delete Question

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Delete Question
Date: 2005-12-07 08:02:02
Message-ID: 20051207080202.GD13724@webserv.wug-glas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

am 07.12.2005, um 8:54:56 +0100 mailte A.j. Langereis folgendes:
> Postgresql supports records in the where clause i.e. you can compare
> multiple columns simultaneously:
>
> > test=# delete from change where id || ':' || datum not in (select id ||
> ':' || max(datum) from change group by id order by 1);
>
> could therefore be rewritten to:
>
> delete from change where (id, datum) in (select id, max(datum) from change
> group by id);

Oh, thank you!

I have tried this way, but with a wrong syntax.

Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47212, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Hallgren 2005-12-07 08:03:58 Re: Graphical modelling tool
Previous Message Pandurangan R S 2005-12-07 07:55:18 Re: Delete Question