Re: [GENERAL] 'distinct on' and 'order by' conflicts of interest

2004-12-31 Thread Bruno Wolff III
On Fri, Dec 31, 2004 at 15:02:56 -0600, [EMAIL PROTECTED] wrote: > > I've put an '*' next to the rows I want. So my dilemma is two part. > First, I want to sort by the ordinal information only when the arc is > pointing from the source object (id 638) to the other objects. Well, it's > pretty

Re: [GENERAL] 'distinct on' and 'order by' conflicts of interest

2004-12-31 Thread stephen
> Define the problem, not how you think it should be solved. What > are you trying to do? If you can't get the query to work, then > please post SQL statements to create and populate a table and > describe the query results you'd like to see. the situation is i have a set of records in a table (

Re: [GENERAL] 'distinct on' and 'order by' conflicts of interest

2004-12-31 Thread Stephan Szabo
On Fri, 31 Dec 2004 [EMAIL PROTECTED] wrote: > It has come up several times on the various postgresql lists that in order > to get around the requirement of DISTINCT ON parameters matching the first > ORDER BY parameters, wrap the distinct query in a new 'order by' query: > > select * from (selec

Re: [GENERAL] 'distinct on' and 'order by' conflicts of interest

2004-12-31 Thread Michael Fuhr
On Fri, Dec 31, 2004 at 10:48:21AM -0600, [EMAIL PROTECTED] wrote: > It has come up several times on the various postgresql lists that in order > to get around the requirement of DISTINCT ON parameters matching the first > ORDER BY parameters, wrap the distinct query in a new 'order by' query: >

[GENERAL] 'distinct on' and 'order by' conflicts of interest

2004-12-31 Thread stephen
It has come up several times on the various postgresql lists that in order to get around the requirement of DISTINCT ON parameters matching the first ORDER BY parameters, wrap the distinct query in a new 'order by' query: select * from (select distinct on (a) a,b,c from foo order by a) order by c