Re: [GENERAL] Alias-Error - Mailing list pgsql-sql

From Jost Richstein
Subject Re: [GENERAL] Alias-Error
Date
Msg-id 3F94DDA0.C84A2E31@softdecc.com
Whole thread Raw
In response to Alias-Error  (Jost Richstein <jrichstein@softdecc.com>)
Responses Re: [GENERAL] Alias-Error  (Richard Huxton <dev@archonet.com>)
Re: [GENERAL] Alias-Error  (Csaba Nagy <nagy@ecircle-ag.com>)
List pgsql-sql
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
          C2.cmc_name='INTERN2000' AND sis_cmca.cmc_mchap=C2.cmc_mchap

Tom Lane wrote:
>
> Jost Richstein <jrichstein@softdecc.com> writes:
> > I am running a query with alias (a self join) against
> > version 7.3.4 on Suse Linux 7.3 and on FreeBSD (v5?).
> > It runs fine on Linux, but produces an error on
> > FreeBSD: "unknown alias C2".
>
> The string "unknown alias" appears nowhere in the 7.3 sources.
> Are you sure you are talking to a Postgres database?
>
>                         regards, tom lane


pgsql-sql by date:

Previous
From: dsankaran@ivesia.com (Dharan)
Date:
Subject: Writing the SQL queries inside Functions and operators
Next
From: Adam Witney
Date:
Subject: Re: how to create a multi columns return function ?