
--删除行政组织策略历史分录
DELETE from t_hbss_orgstrentryHIS  where forgteamid in(select fadminorgid from  t_hbss_orgstrategy where fadminorgid>0 GROUP BY fadminorgid HAVING count(*)>1);

--删除员工策略历史分录
DELETE from t_hbss_empstrentryHIS  where forgteamid in(select fadminorgid from  t_hbss_empstrategy where fadminorgid>0 GROUP BY fadminorgid HAVING count(*)>1);

--删除行政组织策略历史
DELETE from  T_HBSS_ORGSTRATEGYHIS  where forgteamid in(select fadminorgid from  t_hbss_orgstrategy where fadminorgid>0 GROUP BY fadminorgid HAVING count(*)>1);

--删除员工策略历史
DELETE from  T_HBSS_EMPSTRATEGYHIS  where forgteamid in(select fadminorgid from  t_hbss_empstrategy where fadminorgid>0 GROUP BY fadminorgid HAVING count(*)>1);


--删除行政组织策略分录
DELETE from  t_hbss_orgstrentry where fadminorgid in(select fadminorgid from  t_hbss_orgstrategy where fadminorgid>0 GROUP BY fadminorgid HAVING count(*)>1);

--删除员工策略分录
DELETE from  t_hbss_empstrentry where fadminorgid in(select fadminorgid from  t_hbss_empstrategy where fadminorgid>0 GROUP BY fadminorgid HAVING count(*)>1);

--删除行政组织策略
DELETE from  t_hbss_orgstrategy where fadminorgid in(select fadminorgid from  t_hbss_orgstrategy where fadminorgid>0 GROUP BY fadminorgid HAVING count(*)>1);

--删除员工策略
DELETE from  t_hbss_empstrategy where fadminorgid in(select fadminorgid from  t_hbss_empstrategy where fadminorgid>0 GROUP BY fadminorgid HAVING count(*)>1);