Error with DISTINCT

From: Jerome Raupach <jraupach(at)intelcom(dot)fr>
To: pgsql-sql(at)postgresql(dot)org
Subject: Error with DISTINCT
Date: 2000-09-15 09:03:16
Message-ID: 39C1E5D4.6D0F1DFC@intelcom.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

testdb=#SELECT DISTINCT table_2.f1, table_1.f2, '2000-08-22' AS
testdb-#date FROM table_1, table_2 WHERE table_1.f1 = table_2.f1;
ERROR: Unable to identify an ordering operator '<' for type 'unknown'
Use an explicit ordering operator or modify the query

I must execute this query :

testdb=#SELECT table_2.f1, table_1.f2, '2000-08-22' AS date FROM
testdb-#table_1, table_2 WHERE table_1.f1 = table_2.f1 GROUP BY
testdb-#table_2.f1, table_1.f2;

Is it a bug ?
Thanks in advance.

Jerome.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Patrik Kudo 2000-09-15 09:42:24 Re: get table schema in psql?
Previous Message Michael Teter 2000-09-15 08:47:22 get table schema in psql?