Re: version issue?

From: "Dan Wilson" <phpPgAdmin(at)acucore(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: version issue?
Date: 2001-02-26 16:55:43
Message-ID: 002301c0a014$f4f6f7f0$533987cf@corp.peoplesoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Excellent! That worked! Thank you once again Tom! I was under the
impression that you couldn't use an alias in the ORDER BY. Obviously, I was
mistaken.

Thanks,
-Dan

----- Original Message -----
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>

: "Dan Wilson" <phpPgAdmin(at)acucore(dot)com> writes:
: > : Possibly some future release will actually do the right thing with
ORDER
: > : BY of an expression on the output columns, but right now it has to be
an
: > : output column, period.
:
: > OK... I tried adding UPPER(last_name) to the result column lists of both
: > sides of the union and it still gives me the same error.
:
: You have to use the SQL-standard syntax for ORDER BY, ie column name or
: number, no shortcuts:
:
: SELECT ..., UPPER(last_name) AS upper_last_name
: UNION
: SELECT ..., UPPER(last_name) AS upper_last_name
: ORDER BY upper_last_name;
:
: or if you prefer, ORDER BY n where n is the ordinal number of the
: column.
:
: regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2001-02-26 17:00:01 Re: Problem with host connection
Previous Message Tom Lane 2001-02-26 16:51:08 Re: version issue?