From: | Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> |
---|---|
To: | Andreas Schlegel <schlegel(at)software(dot)b(dot)uunet(dot)de> |
Cc: | pgsql <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Error with DISTINCT and AS keywords |
Date: | 2002-07-10 12:25:56 |
Message-ID: | Pine.LNX.4.44.0207101525330.23339-100000@matrix.gatewaynet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Wed, 10 Jul 2002, Andreas Schlegel wrote:
> 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
Do it as
select DISTINCT tnr, titel, 'TEST'::text AS testcol from tTitel;
>
> If I remove the DISTINCT keyword it works:
> select tnr, titel, 'TEST' AS testcol from tTitel;
>
>
>
> Greetings,
> Andreas
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
tel: +30-10-8981112
fax: +30-10-8981877
email: achill(at)matrix(dot)gatewaynet(dot)com
mantzios(at)softlab(dot)ece(dot)ntua(dot)gr
From | Date | Subject | |
---|---|---|---|
Next Message | Christoph Haller | 2002-07-10 12:47:30 | Re: Problem on PostgreSQL (error code, store procedures) |
Previous Message | Dirk Lutzebaeck | 2002-07-10 12:25:42 | How to get total number of rows when using LIMIT/OFFSET? |