> Am I just approaching this all wrong and need to create a temporary table
> and draw from that, or is there a way to salvage this query?
Think about using a subquery instead of the DISTINCT ON approach. I don't
think you can get what you want with DISTINCT ON.
A temporary table is not necessary.
Aglio Database Solutions
In response to
pgsql-sql by date
|Next:||From: Jeremy Smith||Date: 2004-02-19 19:34:39|
|Subject: Re: DISTINCT ON troubles|
|Previous:||From: Josh Berkus||Date: 2004-02-19 19:26:26|
|Subject: Re: Compiling pl/pgsql functions|