日期:2014-05-17 浏览次数:20617 次
if exists(select 1
from A inner join B on A.CA3=b.CB3
where a.CA1 in('01','02','03','04') and a.CA2 in('A','K') and b.CB4 in(10,13,15)
group by a.CA1
having count(b.CB4)>=2)
--statement1
if exists(select 1
from A inner join B on A.CA3=b.CB3
where a.CA1 in('01','02','03','04') and a.CA2 ='S' and b.CB4 in(11,12,15)
group by a.CA1
having count(b.CB4)>=2)
--statement2