Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: order by clause in a view
Why not:
select * from view
order by col;
Instead of putting the order by in the view definition?
And, don't you have to alias the count(cust_no) expression?
Ron Reidy
Lead DBA
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Lyall Barbour
Sent: Tuesday, August 07, 2007 3:18 PM
To: oracle-l_at_freelists.org
Subject: order by clause in a view
Hi,
Simple question. I've got a solution. Hoping you peeps could come up
with a better one.
select cust_no, count(cust_no)
from table
where <blah>
group by cust_no
order by count(cust_no)
works great.
create or replace view <table_v> as
select cust_no, count(cust_no)
from table
where <blah>
group by cust_no
order by count(cust_no)
some ora error
We are running 8.0.5 and that's why. 8i it's fixed. I'm prepared to create a temp table and truncate it after my report goes. But was hoping you guys might have another way to do this....
Thanks,
Lyall Barbour
-- We've Got Your Name at Mail.com <http://www.mail.com/?utm_source=mail_sent_footer&utm_medium=email&utm_t erm=070621&utm_content=textlink&utm_campaign=we_got_your_name> Get a FREE E-mail Account Today - Choose From 100+ Domains This electronic message transmission is a PRIVATE communication which contains information which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. Please notify the sender of the delivery error by replying to this message, or notify us by telephone (877-633-2436, ext. 0), and then delete it from your system. -- http://www.freelists.org/webpage/oracle-lReceived on Tue Aug 07 2007 - 16:59:04 CDT
![]() |
![]() |