|
|
Select As question
In SQL I am able to select a field as something else. I will use this
in generic function for naming grid columns readable to the user.
e.g. Select bdate as [Date of Birth] from ....
Oracle via ADO does not seem to like the [] around the "AS" name. How
would I accomplish this in Oracle?
|
|
0
|
|
|
|
Reply
|
GhostBuck
|
3/21/2010 4:36:08 PM |
|
On Sun, 21 Mar 2010 09:36:08 -0700, GhostBuck wrote:
> Oracle via ADO does not seem to like the [] around the "AS" name. How
> would I accomplish this in Oracle?
Without the brackets around?
--
http://mgogala.freehostia.com
|
|
0
|
|
|
|
Reply
|
Mladen
|
3/21/2010 4:44:43 PM
|
|
Without the brackets it works... but you have to lose the spaces, ":",
".", etc. For instance I might want to do this:
Select BatchNo as [Batch Number:] to make a grid readable by the user.
|
|
0
|
|
|
|
Reply
|
GhostBuck
|
3/21/2010 4:58:22 PM
|
|
GhostBuck wrote:
> In SQL I am able to select a field as something else. I will use this
> in generic function for naming grid columns readable to the user.
>
> e.g. Select bdate as [Date of Birth] from ....
>
> Oracle via ADO does not seem to like the [] around the "AS" name. How
> would I accomplish this in Oracle?
Try with double quotes, so:
Select bdate as "[Date of Birth]" from ....
May help. Know nothing about ADO, pardon if this has been tried and
discarded.
--
S. Anthony Sequeira
++
As usual, this being a 1.3.x release, I haven't even compiled this
kernel yet. So if it works, you should be doubly impressed.
(Linus Torvalds, announcing kernel 1.3.3 on the linux-kernel mailing list.)
++
|
|
0
|
|
|
|
Reply
|
Tony
|
3/21/2010 5:46:31 PM
|
|
On 03/21/2010 06:46 PM, Tony Sequeira wrote:
> GhostBuck wrote:
>> In SQL I am able to select a field as something else. I will use this
>> in generic function for naming grid columns readable to the user.
>>
>> e.g. Select bdate as [Date of Birth] from ....
>>
>> Oracle via ADO does not seem to like the [] around the "AS" name. How
>> would I accomplish this in Oracle?
>
> Try with double quotes, so:
>
> Select bdate as "[Date of Birth]" from ....
>
> May help. Know nothing about ADO, pardon if this has been tried and
> discarded.
I believe double quotes are quite standard in SQL land. So my first
choice would be
Select bdate as "Date of Birth" from ....
Kind regards
robert
--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
|
|
0
|
|
|
|
Reply
|
Robert
|
3/21/2010 6:12:25 PM
|
|
|
4 Replies
446 Views
(page loaded in 0.05 seconds)
|
|
|
|
|
|
|
|
|