Search the web
Sign In
New User? Sign Up
VOUGlist · Virginia Oracle User's Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Concatenating alias columnms   Message List  
Reply | Forward Message #899 of 923 |
Re: Concatenating alias columnms

aliases cannot be referred to in the select list, or anywhere else for that
matter, except in the order by clause

but you can put your query in an in-line query and then reference the aliases in
the outer query

for instance

select .... cases_this_month || ' -- ' || dollars_this_month ....
from (
select ...
, brk.division division
, SUM((NVL(rctl.quantity_invoiced,0)* NVL(msi.attribute13,1)) +
(NVL(rctl.quantity_credited,0)* NVL(msi.attribute13,1)))
cases_this_month
SUM(NVL(rctl.revenue_amount,0)) dollars_this_month
, msi.attribute12
... and the rest of your original query here
)

----- Original Message -----
From: oamen
To: VOUGlist@yahoogroups.com
Sent: Wednesday, February 14, 2007 3:29 PM
Subject: (VOUG) Concatenating alias columnms


HI,
I am trying to concatenate two column alises and am getting an error.
If I use only one alias and keep the other column as it is, the
concatenation works fine..But if I use aliases for two columns and try
to concatenate the two, it doesn't work.
The statement is like this...
-----
, brk.division division
, SUM((NVL(rctl.quantity_invoiced,0)* NVL(msi.attribute13,1)) +
(NVL(rctl.quantity_credited,0)* NVL(msi.attribute13,1)))
cases_this_month
SUM(NVL(rctl.revenue_amount,0)) dollars_this_month
, msi.attribute12

here I want to be able to concatenate cases_this_month and
dollars_this_month..

Any help would be appreciated.

Thanks
Asgar





[Non-text portions of this message have been removed]




Wed Feb 14, 2007 11:16 pm

mcstock@...
Send Email Send Email

Forward
Message #899 of 923 |
Expand Messages Author Sort by Date

HI, I am trying to concatenate two column alises and am getting an error. If I use only one alias and keep the other column as it is, the concatenation works...
oamen
Offline Send Email
Feb 14, 2007
9:26 pm

aliases cannot be referred to in the select list, or anywhere else for that matter, except in the order by clause but you can put your query in an in-line...
Mark C. Stock
mcstock@...
Send Email
Feb 15, 2007
9:01 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help