Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 13B749F9B25 for ; Tue, 14 Aug 2007 08:13:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 74345-10 for ; Tue, 14 Aug 2007 08:13:53 -0300 (ADT) X-Greylist: delayed 00:21:39.533278 by SQLgrey-1.7.5 Received: from smtp-out01.email.it (smtp-out01.email.it [212.97.34.21]) by postgresql.org (Postfix) with ESMTP id 8CDED9F995C for ; Tue, 14 Aug 2007 08:13:57 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-out01.email.it (Postfix) with ESMTP id 06E524016 for ; Tue, 14 Aug 2007 12:52:14 +0200 (CEST) X-Virus-Scanned: amavisd-new at email.it Received: from smtp-out01.email.it ([127.0.0.1]) by localhost (smtp-out01.email.it [127.0.0.1]) (amavisd-new, port 10024) with LMTP id NU7yilzRb00A for ; Tue, 14 Aug 2007 12:52:13 +0200 (CEST) Date: Tue, 14 Aug 2007 12:52:14 +0200 To: pgsql-admin@postgresql.org From: giuseppe.derossi@email.it Reply-to: giuseppe.derossi@email.it Subject: merge two rows where value are null Message-ID: <2fbf3fefb2389d08d2aedf3b60d85557@83.225.63.234> X-Priority: X-Mailer: Webmail-Email.it [Mailer version 1.70] X-SenderIP: 83.225.63.234 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/150 X-Sequence-Number: 26481 Hi all, sorry if OT. I have the following using case: Name, Surname , Job, Hobby, Pet, address John, Smith, NULL, photo, NULL, NULL John, Smith, student, NULL, cat, NULL by using name and surname as selecting key, I want : John, Smith, student, photo, cat, NULL that is I want to substitute the null valus of the LAST row with not-null value of previous one. how can I perform that ? in may installed vesion there aren't function as merge and collect. Thanks in advance GIU -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Entra in Mondolastminute, centinaia di offerte ti aspettano per le tue vacanze a prezzi lastminute! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6851&d=20070814