From: | "Trewern, Ben" <Ben(dot)Trewern(at)mowlem(dot)com> |
---|---|
To: | "'Raymond Chui'" <raymond(dot)chui(at)noaa(dot)gov>, pgsql-general(at)postgresql(dot)org |
Subject: | RE: Does PostgreSQL support Constant Expression (Alias Name)? |
Date: | 2001-03-02 17:21:10 |
Message-ID: | 996802F75C3CD411B424001083FA445B059548@CET_PONXX_FP001 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Try SELECT fname as "First Name", lname as "Last Name" FROM aTable;
Regards
Ben
> -----Original Message-----
> From: Raymond Chui [mailto:raymond(dot)chui(at)noaa(dot)gov]
> Sent: 02 March 2001 14:30
> To: pgsql-general(at)postgresql(dot)org
> Subject: [GENERAL] Does PostgreSQL support Constant Expression (Alias
> Name)?
>
>
> If a table has columns fname, lname.
> I want to do query like
>
> SELECT fname "First Name", lname "Last Name" FROM aTable;
>
> This SELECT statement is fine in Oracle, Sybase and Informix.
> But I get an error message in PostgreSQL
>
> Because I want the output like
>
> First Name | Last Name
> --------------------------
> fn | ln
>
> instead default like
>
> fname | lname
> ---------------
> fn | ln
>
> What is the correct way doing this in PostgreSQL?
> Thank you very much in advance!
>
>
>
> --Raymond
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Elphick | 2001-03-02 17:31:57 | Re: Does PostgreSQL support Constant Expression (Alias Name)? |
Previous Message | David Lynn | 2001-03-02 16:39:00 | Re: Perl & DBI/DBD::Pg confusion with finish |