我在 querystring 中定义了一个查询,我需要执行第二个查询作为公司的选择COM_NAME。
<subDataset name="dataset1"/>
<parameter name="toomonthyear" class="java.lang.String"/>
<parameter name="frommonthyear" class="java.lang.String"/>
<queryString>
<![CDATA[select atr_acc_com_id MGMT_COM_ID,atr_for_con_id CONTACT_ID,
concat(trim(c.CON_FIRST_NAME),' ',trim(c.CON_LAST_NAME)) CONTACT_NAME,
sum(atr_total_amount) - IFNULL((select sum(ftr_amount) from financial_trnasactions t
where t.FTR_ATR_ID = a.atr_id),0) DEBIT_SUM
from accounting_transactions a, invoices i, contact_details c
where ATR_DATE between '2013-09-02' and '2013-09-02'
and atr_acc_com_id = 1015 and
i.inv_atr_id = a.atr_id
AND a.ATR_FOR_CON_ID = c.con_id and
i.inv_state = 2
group by atr_acc_com_id,atr_for_con_id;]]>
</queryString>
请建议实现此目的的方法..