* Tom Lane <[EMAIL PROTECTED]> wrote:
Hi,
> This is not an "extension", it is *directly* contrary to both
> the letter and spirit of the SQL standard.
at which point is this breaking the specification ?
What would happen if postgres would allow this ?
IMHO supporting aliases in where clauses
On 7/13/07, Nis Jørgensen <[EMAIL PROTECTED]> wrote:
Don't attribute to malice what can be adequately explained
by incompetence.
He didn't :)
Nis
Cheers,
Andrej
--
Please don't top post, and don't use HTML e-Mail :} Make your quotes concise.
http://www.american.edu/econ/notes/htmlmail.htm
Tom Lane skrev:
> This is not an "extension", it is *directly* contrary to both the letter
> and spirit of the SQL standard. I can hardly believe that M$ did that
> ... oh, actually, I can entirely believe it. The OP has a serious
> problem of vendor lockin now, and that's exactly what M$ wants.
Adam Tauno Williams <[EMAIL PROTECTED]> writes:
> On Thu, 2007-07-12 at 13:23 -0400, Tom Lane wrote:
>> chester c young <[EMAIL PROTECTED]> writes:
>>> SELECT field1 / 2 AS foo,
>>> field2 * 2 AS bar,
>>> foo + bar AS total
>>> WHERE foo < 12;
>> This is not an "extension", it is *directly* contra
"Adam Tauno Williams" <[EMAIL PROTECTED]> writes:
> "AS" works in Informix, and I believe, in DB2 as well. So it is at
> least pretty common; I'm not saying it is correct. Since Informix
> predates M$-SQL they at least didn't invent it.
AS works in Postgres too. But the defined aliases are onl
On Thu, 2007-07-12 at 13:23 -0400, Tom Lane wrote:
> chester c young <[EMAIL PROTECTED]> writes:
> >> SELECT field1 / 2 AS foo,
> >> field2 * 2 AS bar,
> >> foo + bar AS total
> >> WHERE foo < 12;
> > First, I think it would be great if this worked - like the alias to an
> > update table added in 8
inal Message-
From: Joel Richard <[EMAIL PROTECTED]>
Date: Thu, 12 Jul 2007 13:36:05
To:Tom Lane <[EMAIL PROTECTED]>
Cc:sql pgsql
Subject: Re: [SQL] Converting from MS Access field aliases
On Jul 12, 2007, at 1:23 PM, Tom Lane wrote:
> chester c young <[EMAIL PROTECTED]>
Joel Richard <[EMAIL PROTECTED]> writes:
> What's really screwy is what I found when I hooked access into my
> PostgreSQL database using pgsqlODBC (I know, it's an abomination) and
> I logged the statements that PostgreSQL was processing. In MS Access
> this query:
>SELECT foo AS bar, b
On Jul 12, 2007, at 1:23 PM, Tom Lane wrote:
chester c young <[EMAIL PROTECTED]> writes:
SELECT field1 / 2 AS foo,
field2 * 2 AS bar,
foo + bar AS total
WHERE foo < 12;
First, I think it would be great if this worked - like the alias
to an
update table added in 8.2 - saves a lot of typing
chester c young <[EMAIL PROTECTED]> writes:
>> SELECT field1 / 2 AS foo,
>> field2 * 2 AS bar,
>> foo + bar AS total
>> WHERE foo < 12;
> First, I think it would be great if this worked - like the alias to an
> update table added in 8.2 - saves a lot of typing and makes queries
> much more readab
>SELECT field1 / 2 AS foo,
> field2 * 2 AS bar,
> foo + bar AS total
>WHERE foo < 12;
>
> The first two fields are fine, it's the third that's a problem. The
> database reports
>
>ERROR: column "foo" does not exist
>
First, I think it would be great if this w
> Good morning,
>
> Oh joyous day! We are upgrading a legacy database system from MS
> Access to PostgreSQL! Yay!
>
> Ok, rejoicing over. Here's our issue and PLEASE point me to the right
> place if this has been discussed before.
>
> In MS Access one can reuse field aliases later in the same query
12 matches
Mail list logo