Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Alias Column Names

Re: Alias Column Names

From: Ron Kleem <rkleem_at_etrade.com>
Date: 2000/05/23
Message-ID: <YMzW4.29893$wb7.1720970@news.flash.net>#1/1

My understanding is that when you use a Column alias, you MUST NOT enclose the alias in quotes, as this may force Oracle to store the alias as it appears between the quotes ("First Name" - i.e. mixed case) but oracle will look for the alias in ALL CAPS.

...From Oracle 8 The Complete Reference:

"Internally, ORACLE works with all column and table names in uppercase. This is how they are stored in its data dictionary, and this is how it expects them to be. When aliases are typed to create a view, they should always be naked, without quotation marks around them. Putting double quotation marks around an alias can force the column name stored internally by ORACLE to be in mixed case. If you do this, ORACLE will never be able to find the column when you execute a select.

    Never use double quotation marks in creating aliases for a view.""

David Bradley wrote in message
>I need to sort by a field that does not have a standard field name.
>
>There is a view that has been written as such.
> SELECT firstname as "First Name", lastname as "Last Name" FROM
>tablename;
>
>I want to select from that view and order by the last name field. Is it
>possible and if so how can I do it?
>
>
>
>Thanks in advance.,
>
>David
>
>
Received on Tue May 23 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US