merge two rows where value are null

From: giuseppe(dot)derossi(at)email(dot)it
To: pgsql-admin(at)postgresql(dot)org
Subject: merge two rows where value are null
Date: 2007-08-14 10:52:14
Message-ID: 2fbf3fefb2389d08d2aedf3b60d85557@83.225.63.234
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jayakumar_Mukundaraju 2007-08-14 11:14:28 PgAgent..
Previous Message Tom Lane 2007-08-13 23:21:33 Re: postmaster.pid file