-- ABS-34733
-------------   DBCONSISTENCYCHECK   ---------------------

UPDATE DBCONSISTENCYCHECK DB
   SET DB.SQLSTATEMENT = 'select case when (select count(pt.paymentterms_id) 
     from paymentterms pt
     where pt.defaultpaymentterm =''Y'') > 1 then 0 when (select count(pt.paymentterms_id) 
     from paymentterms pt) = 0 then 0  else 1 end countdefault from dual',
DB.ERRORMESSAGE='There is no record in payment termstable!',
DB.DESCRIPTION='Check if there is more than one default paymentterms!'
 WHERE DB.DBCONSISTENCYCHECK_ID = 25;

commit;