insert into comp_chart_of_acct  (companyID, acctGroupID, acctCode, acctName, acctDesc,createdBy) select 7,b.ID as acctGroupID,a.acctCode,a.acctName,a.acctDescription,16 from _ref_chart_of_acct a, comp_acct_group b where a.businessTypeID=4 and b.companyID =7 and b.refID = a.ID