/**

		清除因业务角色回写笛卡尔积产生的垃圾数据
		涉及表    t_perm_userperm   t_perm_userpermdetail
				t_perm_disfunperm
				t_perm_userrole
				
		需要执行时，在base.xml中加入		
		<SqlScript Type="KSQL" Separator=";" dbkey="basedata">preinsdata/kd_1.5.75_bos_perm_bizrole_cartesian_product_clear.sql</SqlScript>		
*/


DELETE FROM T_PERM_USERPERMDETAIL WHERE FSOURCE='3';

DELETE FROM T_PERM_USERPERM up where not exists (select 1 FROM T_PERM_USERPERMDETAIL upd where up.fid=upd.fid );


DELETE FROM T_PERM_DISFUNPERM WHERE FSOURCE='3';

DELETE FROM T_PERM_USERROLE WHERE FSOURCE='3';

