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