  /*
      CHANGE REPORT for Table PRODUCTGROUP
          - Adding column MOUNTINGPRODUCT
          - Adding column USEGRADECATEGORYDEFECT
          - Adding column SHOWONMOUNTINGORDER
          - Adding column SHOWONDISMOUNTINGORDER
          - Adding column SHOWONPICKLISTRSC
      ACTION is ALTER or modify Table PRODUCTGROUP
      */

ALTER TABLE PRODUCTGROUP ADD (MOUNTINGPRODUCT      VARCHAR2(1) DEFAULT 'N' NOT 
    NULL
                                   CONSTRAINT YN_ValidationNew75
                                          CHECK (MOUNTINGPRODUCT IN ('Y', 'N')))
    ;


ALTER TABLE PRODUCTGROUP ADD (USEGRADECATEGORYDEFECT VARCHAR2(1) DEFAULT 'N' NOT NULL
                                   CONSTRAINT YN_ValidationNew76
                                          CHECK (USEGRADECATEGORYDEFECT IN ('Y',
     'N')));


ALTER TABLE PRODUCTGROUP ADD (SHOWONMOUNTINGORDER  VARCHAR2(1) DEFAULT 'N' NOT 
    NULL
                                   CONSTRAINT YN_ValidationNew77
                                          CHECK (SHOWONMOUNTINGORDER IN ('Y', 
    'N')));


ALTER TABLE PRODUCTGROUP ADD (SHOWONDISMOUNTINGORDER VARCHAR2(1) DEFAULT 'N' 
    NOT NULL
                                   CONSTRAINT YN_ValidationNew78
                                          CHECK (SHOWONDISMOUNTINGORDER IN ('Y',
     'N')));


ALTER TABLE PRODUCTGROUP ADD (SHOWONPICKLISTRSC    VARCHAR2(1) DEFAULT 'N' NOT 
    NULL
                                   CONSTRAINT YN_ValidationNew79
                                          CHECK (SHOWONPICKLISTRSC IN ('Y', 'N')
    ));

UPDATE PRODUCT
SET 
PRODUCT.USEGRADECATEGORYDEFECT = (SELECT PRODUCTGROUP.USEGRADECATEGORYDEFECT FROM PRODUCTGROUP WHERE PRODUCTGROUP.PRODUCTGROUP_ID = PRODUCT.PRODUCTGROUP_ID),
PRODUCT.MOUNTINGPRODUCT = (SELECT PRODUCTGROUP.MOUNTINGPRODUCT FROM PRODUCTGROUP WHERE PRODUCTGROUP.PRODUCTGROUP_ID = PRODUCT.PRODUCTGROUP_ID),
PRODUCT.SHOWONMOUNTINGORDER = (SELECT PRODUCTGROUP.SHOWONMOUNTINGORDER FROM PRODUCTGROUP WHERE PRODUCTGROUP.PRODUCTGROUP_ID = PRODUCT.PRODUCTGROUP_ID),
PRODUCT.SHOWONDISMOUNTINGORDER = (SELECT PRODUCTGROUP.SHOWONDISMOUNTINGORDER FROM PRODUCTGROUP WHERE PRODUCTGROUP.PRODUCTGROUP_ID = PRODUCT.PRODUCTGROUP_ID),
PRODUCT.SHOWONPICKLISTRSC = (SELECT PRODUCTGROUP.SHOWONPICKLISTRSC FROM PRODUCTGROUP WHERE PRODUCTGROUP.PRODUCTGROUP_ID = PRODUCT.PRODUCTGROUP_ID)
WHERE PRODUCT.PRODUCTGROUP_ID IS NOT NULL;
