看看这个语句哪错了?(急)
strSql = "select * from (" +strSql+ ") as A where A.FSSJ >= '"+strfssjQ+"'";<p>运行后出现debug Database:</p><p>select * from (select S.FSSJ,S.YWDM,S.CONTENT,F.CLBZ,F.WGFSSJ,S.ID,F.MSJH,D.NSRSBH,Q.MC,S.CZYBM from WG_PLFSSJTEMP_CLONE S,WG_PLFSSJFJTEMP_CLONE F,XT_SJQYDY D,YW_QYXX Q where S.ID = F.SJ_ID and F.MSJH = D.SJH and D.NSRSBH=Q.NSRSBH and (S.CZYBM in (select CZYDM from YW_CZYXX where SWJGDM = '') or S.CZYBM like '%自动发送程序%')) as A where A.FSSJ >= '2005-04-24 13:31:15' and A.FSSJ <= '2007-04-25 13:31:15' order by A.ID</p><p>运行不过去~~错误:as附近有错。</p><p>哪个高手给看看哈~~</p>源程序
<p> strSql=sql_top+" from WG_PLFSSJTEMP_CLONE S,WG_PLFSSJFJTEMP_CLONE F,XT_SJQYDY D,YW_QYXX Q";<br/> }else{<br/> strSql=sql_top+" from WG_PLFSSJTEMP S,WG_PLFSSJFJTEMP F,XT_SJQYDY D,YW_QYXX Q";<br/> }</p><p> strSql=strSql + " where S.ID = F.SJ_ID and F.MSJH = D.SJH and D.NSRSBH=Q.NSRSBH "<br/> +" and (S.CZYBM in (select CZYDM from YW_CZYXX where SWJGDM = '"<br/> + strSwjgdm + "') or S.CZYBM like '%自动发送程序%')";</p><p> if (!(strfssjQ == null) && !strfssjQ.equals("")) {<br/> strSql = "select * from (" +strSql+ ") as A where A.FSSJ >= '"+strfssjQ+"'";<br/> }</p><p> if (!(strfssjZ == null) && !strfssjZ.equals("")) {<br/> strSql = strSql+" and A.FSSJ <= '" + strfssjZ + "'";<br/> }</p><p> if (!(strNSRSBH == null) && !strNSRSBH.equals("")) {<br/> strSql = strSql+" and A.NSRSBH like '%" + strNSRSBH + "%'";<br/> }</p><p> if (!(strNSRMC == null) && !strNSRMC.equals("")) {<br/> strSql = strSql+" and A.MC like '%" + strNSRMC + "%'";<br/> }</p><p> if (!(strSJH == null) && !strSJH.equals("")) {<br/> strSql = strSql+" and A.MSJH like'%" + strSJH + "%'";<br/> }</p><p> if (!(strNR == null) && !strNR.equals("")) {<br/> strSql = strSql + " and A.CONTENT like '%" + strNR + "%'";<br/> }</p><p> if (!(strYWDM == null) && !strYWDM.equals("")) {<br/> strSql = strSql + " and A.YWDM='" + strYWDM + "'";<br/> }</p><p> if (!(strClbz == null) && !strClbz.equals("")) {<br/> strSql = strSql + " and A.CLBZ='" + strClbz + "'";<br/> }</p><p> if (!(strFsr == null) && !strFsr.equals("")) {<br/> String strFsrdm=getFsrxx(null,strFsr);<br/> if(!(strFsrdm == null) && !"".equals(strFsrdm)){<br/> strSql=strSql + " and A.CZYBM = '"+strFsrdm+"' ";<br/> }<br/> }else{<br/> if(!"1".equals(strQx)){<br/> String strFsrdm=getFsrxx(null,strFsr);<br/> if(!(strFsrdm == null) && !"".equals(strFsrdm)){<br/> strSql=strSql + " and A.CZYBM = '"+strFsrdm+"' ";<br/> }<br/> }<br/> }</p><p> strSql = strSql + " order by A.ID";</p><p>哪位大虾给看看啊!!</p> <p>AS A</p><p>做什么?</p>表达不清楚啊
需要说明一下 <p>就是先通过查找,把符合条件的找出来后,以虚拟表的形式被另一个语句调用。我同事实现了该方法,不过他去出差了......我还是等他来了帮我吧。呵呵~~</p>
页:
[1]