Folks,


I have three tables:



TABLE (FIELDS,...) : {(DATA),...}

----------------------------------------------

T1 (F1) : {(1)}

T2 (F1,F2) : {(1,1),(1,2)}

T3 (F1,F3) : {(1,10),(1,20),(1,30)}



Need to make a report query to select :



F1, count(T2), count(T3),



So in given example need a result to be:



1, 2 , 3



I attempted to do it in the flowing way but it evidently didn't' work:



ReportQueryByCriteria qry = QueryFactory.newReportQuery(T1.class, null);

qry.setColumns(new String[] {

                        "F1",

                        "count(T2.*)",

"count(T3.*)"

}



qry.addGroupBy(new String[] {

                        "F1"

}



Can I use subqueries to do it? If so can anyone please give me a hint
how I can do it, or point me in some other way I can do it with OJB,



Thank you in advance,



Sergey





**********************
** LEGAL DISCLAIMER **
**********************

This E-mail message and any attachments may contain
legally privileged, confidential or proprietary
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of
this message to the intended recipient(s), you are
hereby notified that any dissemination, distribution
or copying of this E-mail message is strictly
prohibited. If you have received this message in
error, please immediately notify the sender and
delete this E-mail message from your computer.

Reply via email to