X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8B8D3D1B538; Tue, 21 Oct 2003 19:02:38 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 28079-07; Tue, 21 Oct 2003 16:02:08 -0300 (ADT) Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by svr1.postgresql.org (Postfix) with ESMTP id A5F16D1B548; Tue, 21 Oct 2003 16:02:06 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-32.mail.demon.net with esmtp (Exim 3.35 #1) id 1AC1lf-000Gcj-0W; Tue, 21 Oct 2003 20:02:07 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 71FC61791C; Tue, 21 Oct 2003 20:02:05 +0100 (BST) Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id C2E241791B; Tue, 21 Oct 2003 20:02:04 +0100 (BST) From: Richard Huxton To: jrichstein@softdecc.com, pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: Re: [SQL] Alias-Error Date: Tue, 21 Oct 2003 20:02:04 +0100 User-Agent: KMail/1.5 References: <3F867086.DF4DEDF0@softdecc.com> <19199.1066315399@sss.pgh.pa.us> <3F94DDA0.C84A2E31@softdecc.com> In-Reply-To: <3F94DDA0.C84A2E31@softdecc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200310212002.04344.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/1041 X-Sequence-Number: 51114 On Tuesday 21 October 2003 08:17, Jost Richstein wrote: > Ok. The exact error message is as follows: > > SQLException Time : Mon Oct 20 13:15:25 CEST 2003 > SQLException ErrorCode : 0 > SQLException SQLState : null > SQLException Message : ERROR: Relation "c2" does not exist > SQLException Connection: 4878867 > > The query is something like this: > > SELECT DISTINCT C2.cmc_mchap, C2.cmc_sort > FROM sis_cmca, sis_cmca C2 > WHERE cm_status != 'U' AND sis_cmca.cmc_name='INTERN2000' AND ^^^^^^^^^ You're missing a table name here. It could be PG is reporting the wrong error. > C2.cmc_name='INTERN2000' AND sis_cmca.cmc_mchap=C2.cmc_mchap -- Richard Huxton Archonet Ltd