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!

count nested table

694362Nov 21 2009 — edited Nov 21 2009
select bt.ISBN, bt.title, bt.author, bt.classmark, ct.copy#, count(s) numOnLoan
from book_tab bt, copy_tab ct, table(ct.isSubjectOf) s
where bt.ISBN like 'S.321.45%'
or bt.title like 'S.321.45%'
or bt.author like 'S.321.45%'
or bt.classmark like 'S.321.45%'
hello folks i cant seem to find any threads that answer my question.
if i remove the count this query works

each row in the copy_tab has a nested table of ref to loan_t. I want to output a column for each row that displays how many rows there are in the nested table i.e. how many copies are on loan.

i have tried a few things but none of them work! hence why im here!
This post has been answered by Solomon Yakobson on Nov 21 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 19 2009
Added on Nov 21 2009
5 comments
504 views