Error with DISTINCT and AS keywords

From: Andreas Schlegel <schlegel(at)software(dot)b(dot)uunet(dot)de>
To: pgsql <pgsql-sql(at)postgresql(dot)org>
Subject: Error with DISTINCT and AS keywords
Date: 2002-07-10 11:57:52
Message-ID: 3D2C2140.7060003@software.b.uunet.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I need some help to let this sql statement run with Postgres 7.2.1

Doesn't work:
select DISTINCT tnr, titel, 'TEST' AS testcol from tTitel;
ERROR: Unable to identify an ordering operator '<' for type 'unknown'
Use an explicit ordering operator or modify the query

If I remove the DISTINCT keyword it works:
select tnr, titel, 'TEST' AS testcol from tTitel;

Greetings,
Andreas

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dirk Lutzebaeck 2002-07-10 12:25:42 How to get total number of rows when using LIMIT/OFFSET?
Previous Message Ian Cass 2002-07-10 09:38:36 Help with function optimisation