½ñÌìÔÚ¿ª·¢µÄʱºòÐèÒª²éѯÊý¾Ý¿âÖÐÄÄЩѧÉúÓжà¸öѧºÅ£¬Ð´µÄsqlÈçÏ£º
select * from(
select count(t1.xh) as xhs,t2.uuid,t3.xm as xsxm,t3.sfzjh, t1.xjzt as xjzt from hust_xs_jb t1
INNER JOIN hust_xx_identity t2 on t1.sfid= t2.sfid
INNER JOIN hust_xx_profile t3 on t2.uuid=t3.uuid group by t2.uuid ,t3.xm, t3.sfzjh, t1.xjzt order by t3.xm) t
where xhs>=2 and xjzt not in('15','17','19','21','30','31','32','33','34','35','36','37','38','39','40','51','52','53','54')
²é³öµÄÊý¾ÝΪ¿Õ£¬µ«ÊÇÈ¥µôwhereÌõ¼þÖеĵڶþ¸öÌõ¼þ£¨Ò²¾ÍÊÇNOT INÌõ¼þ£©È´Äܲé³ö31ÌõÊý¾Ý£¬ÇÒÆäÖÐÖ»ÓÐÒ»ÌõµÄÊý¾ÝµÄXJZT×Ö¶ÎΪ33£¬ÆäËûµÄ¶¼Îªnull£¬Ó¦¸Ã²é³ö30ÌõÊý¾Ý°¡£¬ÕâÊÇÎªÊ²Ã´ÄØ£¿ÄѵÀNOT IN»á½«nullÖµ¹ýÂ˵ô£¿ÓÚÊǽ«sqlÉÔ¼ÓÐ޸ģº
select * from(
select count(t1.xh) as xhs,t2.uuid,t3.xm as xsxm,t3.sfzjh, t1.xjzt as xjzt from hust_xs_jb t1
INNER JOIN hust_xx_identity t2 on t1.sfid= t2.sfid
INNER JOIN hust_xx_profile t3 on t2.uuid=t3.uuid group by t2.uuid ,t3.xm, t3.sfzjh, t1.xjzt order by t3.xm) t
where xhs>=2 and (xjzt not in('15','17','19','21','30','31','32','33','34','35','36','37','38','39','40','51','52','53','54') or xjzt is null)
¾ÍÄܲé³öËùÐèÒªµÄ30ÌõÊý¾ÝÁË¡£ÍøÉϲéÁËһϣ¬ËµOracle not in Èç¹û·µ»ØµÄÓÐnullÖµµÄ»°£¬¾Í²»»áÓмǼ¡£
¡¶oracle´óÐÍÊý¾Ý¿âϵͳÔÚAIX/unixÉϵÄʵսÏê½â¡·ÌÖÂÛ23£º¹ØÓÚTivoli storage manage¡£ÎÄÆ½ Õâ¶ÎÈÕ×Ó¼äÓÐÈô¸ÉÕâ±¾ÊéµÄÅóÓÑÀ´ÓʼþÌÖÂÛTSMµÄÎÊÌ⣬ÒÔ¼°ÊDz»ÊÇÒªÉÏTSM±¸·ÝϵͳµÄÎÊÌâ¡£ÉõÖÁ°Ñ·½°¸·¢¹ýÀ´ÇëÎÒ¿´¿´£¬°Ñ¹Ø£¡Ð»Ð»Ð»Ð»´ó¼ÒµÄÐÅÈΣ¬¶ÔÕâ¸ö¶«Î÷ÎÒÒ²ÊÇÕ¾ÔÚ×îÖÕÓû§µÄ½Ç¶ÈÀ´¿´µÄ£¬ÕâÀïÎÒÃÇÌÖÂÛÌÖÂÛ£¬ÁÄÁÄ¡£ ÏÔÈ»£¬ºÃµÄ¼ ......