pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleus Mantzios <achill@matrix.gatewaynet.com>
To: Andreas Schlegel <schlegel@software.b.uunet.de>
Cc: pgsql <pgsql-sql@postgresql.org>
Subject: Re: Error with DISTINCT and AS keywords
Date: Wed, 10 Jul 2002 15:25:56 +0300 (EEST)
Message-ID: <Pine.LNX.4.44.0207101525330.23339-100000@matrix.gatewaynet.com> (raw)
In-Reply-To: <3D2C2140.7060003@software.b.uunet.de>

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@matrix.gatewaynet.com
        mantzios@softlab.ece.ntua.gr




view thread (5+ messages)  latest in thread

Message-ID: <Pine.LNX.4.44.0207101525330.23339-100000@matrix.gatewaynet.com>
Permalink:  ../Pine.LNX.4.44.0207101525330.23339-100000@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.44.0207101525330.23339-100000@matrix.gatewaynet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: achill@matrix.gatewaynet.com, schlegel@software.b.uunet.de
  Subject: Re: Error with DISTINCT and AS keywords
  In-Reply-To: <Pine.LNX.4.44.0207101525330.23339-100000@matrix.gatewaynet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox