Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 4F16C476E1D for ; Wed, 19 Jun 2002 14:55:58 -0400 (EDT) Received: from mailout04.sul.t-online.com (mailout04.sul.t-online.com [194.25.134.18]) by postgresql.org (Postfix) with ESMTP id 2F2D4476D3B for ; Wed, 19 Jun 2002 14:03:37 -0400 (EDT) Received: from fwd06.sul.t-online.de by mailout04.sul.t-online.com with smtp id 17Kjns-0003ry-04; Wed, 19 Jun 2002 20:03:36 +0200 Received: from avocado.shifted-bytes.de (520056191158-0001@[217.224.248.60]) by fmrl06.sul.t-online.com with esmtp id 17Kjnn-0pxgzwC; Wed, 19 Jun 2002 20:03:31 +0200 Received: from shifted-bytes.de (orange.shifted-bytes.de [10.0.0.14]) by avocado.shifted-bytes.de (8.12.2/8.12.2) with ESMTP id g5JI3UmI000885 for ; Wed, 19 Jun 2002 20:03:30 +0200 (CEST) Message-ID: <3D10C770.7040100@shifted-bytes.de> Date: Wed, 19 Jun 2002 20:03:28 +0200 From: Michael Agbaglo User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 X-Accept-Language: en-us MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: syntax for access an alias in the where clause ? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Sender: 520056191158-0001@t-dialin.net X-Archive-Number: 200206/253 X-Sequence-Number: 8218 Hi ! It's long ago since I used SQL :-) select [expression 1] as [alias 1], [expression 2] as [alias 2] where [alias 1] < [alias 2] order by [alias 2] - [alias 1] ---> ERROR: Attribute '[alias 1]' not found I found a lot of 'select [expression] as' but I've never seen somebody accessing the alias ... Can't this be done ? M.