INSERT INTO t_sys_oper_grant(oper_id, func_id, other)
select o.oper_id, m.menu_id, '' 
from t_sys_operator o,
	(
	 select menu_id 
	 from t_sys_menu
	 where (menu_name <> '-')     		
	) m
where not exists(select top 1 1 from t_sys_oper_grant tab_a with(nolock) 
								where tab_a.oper_id=o.oper_id and
									  tab_a.func_id=m.menu_id)
GO