Received: from matrix.gatewaynet.com (unknown [217.19.69.50]) by postgresql.org (Postfix) with ESMTP id B6402475F1D for ; Wed, 10 Jul 2002 08:26:40 -0400 (EDT) Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.11.6/8.11.6) with ESMTP id g6ACPuj23905; Wed, 10 Jul 2002 15:25:56 +0300 Date: Wed, 10 Jul 2002 15:25:56 +0300 (EEST) From: Achilleus Mantzios To: Andreas Schlegel Cc: pgsql Subject: Re: Error with DISTINCT and AS keywords In-Reply-To: <3D2C2140.7060003@software.b.uunet.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200207/136 X-Sequence-Number: 8515 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