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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Count of rows from different Columns

user10594152Apr 8 2009 — edited Apr 9 2009
SELECT (SELECT COUNT (empno) empno
          FROM emp) empno, (SELECT COUNT (mgr) mgr
                              FROM emp) mgr, (SELECT COUNT (sal) sal
                                                FROM emp
                                               WHERE sal > 2000) sal
  FROM DUAL;
Hi friends
Please let me know any better solutions for this query..??
This post has been answered by BluShadow on Apr 8 2009
Jump to Answer

Comments

2827010
You have 3 options here (or maybe some more)

1) Use the content presenter with a List template. This should be an OOTB template.
2) Create your own content presenter template. You have two sorts of templates for the CP. The first one is for single item content and the second one is for multiple items. The one i gave you in the previous example (MovieLibrary) is a single item template. When you create a template for multiple items, you have a reference to a collection with all the content from your query in the content presenter. THis can be based upon a query, folder,...
3) Create your own custom taskflow and use the RIDC API from UCM to query the UCM. This is the most flexible solution but needs most coding.
2827010
Is is also an option if you could create a single page that could both show the list as your specific template?
822620
Option 2 seems the way to go, I'll read in the developer guide about it... any tips, advice, or sample code would be much appreciated (using the same 'Movie' example).
2827010
Basicly, half of the work is already done :)
Remember thati said how you could include an existing content presenter in your template?
this is the technique we will be using in the "Master template".

I'll see what i can put up :)
822620
Heres what I have so far...

<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:dt="http://xmlns.oracle.com/webcenter/content/templates"
xmlns:cmf="http://xmlns.oracle.com/webcenter/content/faces"
version="2.1" xmlns:f="http://java.sun.com/jsf/core">

<dt:contentListTemplateDef var="nodes">
<af:panelGroupLayout id="pgl1" layout="horizontal">
<af:panelGroupLayout id="pgl2" layout="vertical">
<af:outputText value="Weapon Systems" id="ot1"/>
<af:iterator id="i1" value="#{nodes}" var="node">
<af:commandLink text="#{node.title}" id="cl1" action="*?????*"
actionListener="#{*????*}"/>
</af:iterator>
</af:panelGroupLayout>
<f:facet name="separator">
<af:spacer width="20" height="10" id="s1"/>
</f:facet>
</af:panelGroupLayout>
</dt:contentListTemplateDef>


</jsp:root>
822620
I don't know how to pass a reference to a collection with all the content from your query in the content presenter... I'm guessing I use a parameter?
822620
I ended up creating a new Navigation-Model and displaying it with a foreach.
1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 7 2009
Added on Apr 8 2009
13 comments
11,372 views