Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Does oracle support array in SQL?

757742Mar 3 2010 — edited Mar 3 2010
The follow syntax for postgresql works with good performance, does Oracle support? Thanks

select
r.company_code,
r.date,
r.d5[1] as d5_udm,
r.d5[2] as d5_ddm,
r.d5[3] as d5_tr,
from (
select
q.company_code,
q.date,
(select array[avg(abs(highest_rate-opening_rate)), avg(abs(opening_rate-lowest_rate)), avg(highest_rate-lowest_rate)] from (select lowest_rate, highest_rate, opening_rate from hkex.quotation q1 where not q1.is_trade_suspend and q1.company_code=q.company_code and q1.date<=q.date order by q1.date desc limit 5) t) as d5
from hkex.quotation q
where not q.is_trade_suspend
) r;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2010
Added on Mar 3 2010
3 comments
546 views