insert into comp_opening_balance (companyID, accountID, year, createdBy) select 1, ID, 2016, 1	from comp_chart_of_acct where companyID = 1 and ID not in (select accountID from comp_opening_balance where year= 2016 and companyID = 1)