insert into comp_control_acct_setup (companyID, accountCode,orderNo,createdby)  select 81,name,orderNo,1 from master_code where masterID = 21 and name not in (select accountCode from comp_control_acct_setup where companyID = 81) 