Re: Error with DISTINCT

From: Jie Liang <jliang(at)ipinc(dot)com>
To: Jerome Raupach <jraupach(at)intelcom(dot)fr>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Error with DISTINCT
Date: 2000-09-15 21:36:38
Message-ID: 39C29666.2689C66@ipinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

try this:
testdb=#SELECT DISTINCT table_2.f1, table_1.f2, date('2000-08-22') AS
testdb-#date FROM table_1, table_2 WHERE table_1.f1 = table_2.f1;

Jerome Raupach wrote:

> 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.

--
Jie LIANG

Internet Products Inc.

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

jliang(at)ipinc(dot)com
www.ipinc.com

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Roderick A. Anderson 2000-09-15 23:53:39 Re: get table schema in psql?
Previous Message Jie Liang 2000-09-15 21:29:26 Re: get table schema in psql?