Re: UPDATE Query problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Josh Berkus" <josh(at)agliodbs(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: UPDATE Query problem
Date: 2002-01-18 04:14:18
Message-ID: 3909.1011327258@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

"Josh Berkus" <josh(at)agliodbs(dot)com> writes:
> Interesting. however, it appears to give me the most recent record with
> non-NULL values. What I want is the most recent record with non-NULL values
> *before* the record I'm trying to update.

Oh, I'm sorry: forgot the extra qualification on the innermost SELECT:

AND oldest.timestamp < history.timestamp

> Yeah, you guessed it ... MS SQL Server 7.

I dunno, how good is SQL Server on subselects?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-01-18 04:16:53 Re: Bug in pg_dump/restore -o
Previous Message Bruce Momjian 2002-01-18 04:14:03 Re: Bug in pg_dump/restore -o

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 2002-01-18 04:15:03 Re: User Permissions
Previous Message Josh Berkus 2002-01-18 03:59:27 Re: UPDATE Query problem