pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: giuseppe.derossi@email.it
To: pgsql-admin@postgresql.org
Subject: merge two rows where value are null
Date: Tue, 14 Aug 2007 12:52:14 +0200
Message-ID: <2fbf3fefb2389d08d2aedf3b60d85557@83.225.63.234> (raw)

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





view thread (4+ messages)  latest in thread

Message-ID: <2fbf3fefb2389d08d2aedf3b60d85557@83.225.63.234>
Permalink:  ../2fbf3fefb2389d08d2aedf3b60d85557@83.225.63.234/
Also on:    postgresql.org/message-id/2fbf3fefb2389d08d2aedf3b60d85557@83.225.63.234

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: giuseppe.derossi@email.it
  Subject: Re: merge two rows where value are null
  In-Reply-To: <2fbf3fefb2389d08d2aedf3b60d85557@83.225.63.234>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox