C C++ if 语句中判断条件代表false的一些字符

展开阅读全文

语句where 1<>1代表什么意思?

06-14

rnrnasrnrnbegin tran rn select B.SSZT, B.KMDM, B.TYPEID, B.QCYE KMQCYE, B.QCYE TYPEQCYE rn into #TEMPPHJYrn from Z_TABZXHSOBJECTQC Brn where 1<>1rnrn if (@KMDM<>'') and (@TYPEID>0)rn beginrn insert into #TEMPPHJYrn select B.SSZT, B.KMDM, AA.TYPEID, B.QCYE KMQCYE, 0 rn from Z_TABKMJE B,rn (rn select distinct A.SSZT, C.KMDM, A.TYPEIDrn from Z_TABZXHSKM A,Z_TABKM Crn where A.SSZT=@SSZT and rn A.SSZT=C.SSZT and rn C.KMDM like rtrim(A.KMDM)+'%' and rn (C.SFJFZDC=1 or C.SFDFZDC=1) and rn C.KMDM like @KMDM+'%' andrn A.TYPEID=@TYPEID andrn not exists(rn select * from Z_TABZXHSOBJECTQC Drn where A.SSZT=D.SSZT and rn C.KMDM=D.KMDM and rn A.TYPEID=D.TYPEID rn )rn ) AArn WHERE AA.SSZT=B.SSZT andrn AA.KMDM=B.KMDM andrn B.SSZT=@SSZT and rn B.QCYE<>0rnrn insert into #TEMPPHJYrn select B.SSZT, B.KMDM, AA.TYPEID, B.QCYE KMQCYE, AA.QCYE TYPEQCYE rn from Z_TABKMJE B,rn (rn select A.SSZT, A.KMDM, A.TYPEID, sum(A.QCYE) QCYErn from Z_TABZXHSObjectQC Arn where A.SSZT=@SSZT and rn A.KMDM=@KMDM and rn A.TYPEID=@TYPEIDrn group by A.SSZT, A.KMDM, A.TYPEIDrn ) AArn WHERE AA.SSZT=B.SSZT andrn AA.KMDM=B.KMDMrn and AA.QCYE<>B.QCYErn endrn else if (@KMDM<>'') and (@TYPEID=0)rn beginrn insert into #TEMPPHJYrn select B.SSZT, B.KMDM, AA.TYPEID, B.QCYE KMQCYE, 0 rn from Z_TABKMJE B,rn (rn select distinct A.SSZT, C.KMDM, A.TYPEIDrn from Z_TABZXHSKM A,Z_TABKM Crn where A.SSZT=@SSZT and rn A.SSZT=C.SSZT and rn C.KMDM like rtrim(A.KMDM)+'%' and rn (C.SFJFZDC=1 or C.SFDFZDC=1) and rn C.KMDM like @KMDM+'%' andrn not exists(rn select * from Z_TABZXHSOBJECTQC Drn where A.SSZT=D.SSZT and rn C.KMDM=D.KMDM and rn A.TYPEID=D.TYPEID rn )rn ) AArn WHERE AA.SSZT=B.SSZT andrn AA.KMDM=B.KMDM andrn B.SSZT=@SSZT and rn B.QCYE<>0rnrn insert into #TEMPPHJYrn select B.SSZT, B.KMDM, AA.TYPEID, B.QCYE KMQCYE, AA.QCYE TYPEQCYErn from Z_TABKMJE B,rn (rn select A.SSZT, A.KMDM, A.TYPEID, sum(A.QCYE) QCYErn from Z_TABZXHSObjectQC Arn where A.SSZT=@SSZT and rn A.KMDM=@KMDMrn group by A.SSZT, A.KMDM, A.TYPEIDrn ) AArn WHERE AA.SSZT=B.SSZT andrn AA.KMDM=B.KMDMrn and AA.QCYE<>B.QCYErn endrn else if (@KMDM='') and (@TYPEID=0)rn beginrn insert into #TEMPPHJYrn select B.SSZT, B.KMDM, AA.TYPEID, B.QCYE KMQCYE, 0 rn from Z_TABKMJE B,rn (rn select distinct A.SSZT, C.KMDM, A.TYPEIDrn from Z_TABZXHSKM A,Z_TABKM Crn where A.SSZT=@SSZT and rn A.SSZT=C.SSZT and rn C.KMDM like rtrim(A.KMDM)+'%' and rn (C.SFJFZDC=1 or C.SFDFZDC=1) and rn not exists(rn select * from Z_TABZXHSOBJECTQC Drn where A.SSZT=D.SSZT and rn C.KMDM=D.KMDM and rn A.TYPEID=D.TYPEID rn )rn ) AArn WHERE AA.SSZT=B.SSZT andrn AA.KMDM=B.KMDM andrn B.SSZT=@SSZT and rn B.QCYE<>0rnrn insert into #TEMPPHJYrn select B.SSZT, B.KMDM, AA.TYPEID, B.QCYE KMQCYE, AA.QCYE TYPEQCYErn from Z_TABKMJE B,rn (rn select A.SSZT, A.KMDM, A.TYPEID, sum(A.QCYE) QCYErn from Z_TABZXHSObjectQC Arn where A.SSZT=@SSZT rn group by A.SSZT, A.KMDM, A.TYPEIDrn ) AArn WHERE AA.SSZT=B.SSZT andrn AA.KMDM=B.KMDMrn and AA.QCYE<>B.QCYE rn end rn /*rn else rn beginrn select B.SSZT, B.KMDM, B.TYPEID, B.QCYE KMQCYE, B.QCYE TYPEQCYErn from Z_TABZXHSObjectQC B rn WHERE 1<>1rn endrn */rn select * from #TEMPPHJY order by KMDM, TYPEIDrnrncommit tranrnreturn 0rnrnGO rn 论坛

没有更多推荐了,返回首页