統(tǒng)計主表關聯(lián)的滿足一定條件的子表數(shù)量 統(tǒng)計主表關聯(lián)的子表數(shù)量: 其中znld是主表的id; 主表:specialcase 子表:to_zhuanan_xsczqk,to_zhuanan_xckcqz www.2cto.com String cxfSql = select ((select count(*) from to_zhuanan_xsczqk a,specialcase b wh
統(tǒng)計主表關聯(lián)的滿足一定條件的子表數(shù)量
統(tǒng)計主表關聯(lián)的子表數(shù)量:
其中znld是主表的id;
主表:specialcase
子表:to_zhuanan_xsczqk,to_zhuanan_xckcqz
www.2cto.com
String cxfSql = "select ((select count(*) from to_zhuanan_xsczqk a,specialcase b where a.zhuanan_id=b.id and a.xsczqksj>=to_date('"+ time1+ "','yyyy-MM-dd') and a.xsczqksj<=to_date('"+ time2+ "','yyyy-MM-dd') and b.id= '"
+ znId
+ "')+(select count(*) from to_zhuanan_xckcqz a,specialcase b where a.zhuanan_id=b.id and a.XCKCQZSJ>=to_date('"+ time1+ "','yyyy-MM-dd') and a.XCKCQZSJ<=to_date('"+ time2+ "','yyyy-MM-dd') and b.id= '"
+ znId
+ "')) as shuliang from dual";
聲明:本網(wǎng)頁內容旨在傳播知識,若有侵權等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com