Re: convert access sql to postgresql - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: convert access sql to postgresql
Date
Msg-id 20071116231257.GF31271@svana.org
Whole thread Raw
In response to Re: convert access sql to postgresql  (Tom Hart <tomhart@coopfed.org>)
List pgsql-general
On Fri, Nov 16, 2007 at 05:43:44PM -0500, Tom Hart wrote:
> I've been doing some googling on sql aliases (my sql knowledge is far
> from impressive) and it appears that column aliases can be great for
> displaying different column names in your output. However I was unable
> to find any information regarding using column aliases as variables,
> like in the code above. I'm not sure why this works in access, but does
> postgreSQL support using a column alias like a variable within the query
> that the alias was defined in?

IIRC this is not mentioned in the SQL standard. Not sure why, maybe the
theory is that all output columns are calculated simultenously which
can't be true if they refer to eachother.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
>  -- John F Kennedy

Attachment

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: public schema doubt
Next
From: David Fetter
Date:
Subject: Re: Primary Key