update comp_control_acct_setup set updateable = 0 where companyID = 104 and updateable = 1  and accountID > 0  and accountID in (select distinct acctCode from comp_journal_detail where companyid = 104 )