alter table bm_yd0000 drop constraint ck_bm_yd0000; 
ALTER TABLE bm_yd0000
ADD CONSTRAINT ck_bm_yd0000 CHECK (YPJCL0 >= 0 AND YPJCL0 < 1  AND SFKYYY IN ('Y','N')
 AND SFDZGG IN ('0','1') AND            CFJB00 >= 0 AND QZFS00 IN ('0','1','2','3','4') AND SFPSYY IN ('Y','N') AND      
       SFZBYP IN ('Y','N') AND KCJE00 >= 0 AND KCSL00 >= 0 AND KCXX00 >= 0 AND       
            KCSX00 >= KCXX00 AND NVL(CYJL00,0) >= 0 AND NVL(GJZSL0,0) >= 0 AND        
                NVL(GJZJE0,0) >= 0 AND NVL(GJPJDJ,0) >= 0 AND NVL(GJJ000,0) >= 0 AND      
                      NVL(ZBJ000,0) >= 0 AND ((SFKYYY = 'Y' AND LSJ000 >= 0) OR (SFKYYY = 'N' AND LSJ000 > 0)) AND     
                             NVL(PFJ000,0) >= 0 AND         
                                ((KCDW00 = JLDW00 AND K2J000 = 1) OR (KCDW00 <> JLDW00 AND K2J000 > 0)) AND     
                                       ((MZFYDW = JLDW00 AND M2J000 = 1) OR (MZFYDW <> JLDW00 AND M2J000 > 0)) AND      
                                             ((ZYFYDW = JLDW00 AND Z2J000 = 1) OR (ZYFYDW <> JLDW00 AND Z2J000 > 0)))
/
