IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_DIMMATERULEBILL' AND KSQL_COL_NAME IN ('FENTRYFIELDEXTID')) 
ALTER TABLE T_EB_DIMMATERULEBILL ADD (FENTRYFIELDEXTID BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_DIMMATERULEBILL' AND KSQL_COL_NAME IN ('FACCOUNTFIELDEXTID')) 
ALTER TABLE T_EB_DIMMATERULEBILL ADD (FACCOUNTFIELDEXTID BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_DIMMATERULEBILL' AND KSQL_COL_NAME IN ('FCURRENCYFIELDEXTID')) 
ALTER TABLE T_EB_DIMMATERULEBILL ADD (FCURRENCYFIELDEXTID BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_DIMMATERULEBILL' AND KSQL_COL_NAME IN ('FPROJECTFIELDEXTID')) 
ALTER TABLE T_EB_DIMMATERULEBILL ADD (FPROJECTFIELDEXTID BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_DIMMATERULEBILL' AND KSQL_COL_NAME IN ('FUSERDEFINED1FIELDEXTID')) 
ALTER TABLE T_EB_DIMMATERULEBILL ADD (FUSERDEFINED1FIELDEXTID BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_DIMMATERULEBILL' AND KSQL_COL_NAME IN ('FUSERDEFINED2FIELDEXTID')) 
ALTER TABLE T_EB_DIMMATERULEBILL ADD (FUSERDEFINED2FIELDEXTID BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_DIMMATERULEBILL' AND KSQL_COL_NAME IN ('FUSERDEFINED3FIELDEXTID')) 
ALTER TABLE T_EB_DIMMATERULEBILL ADD (FUSERDEFINED3FIELDEXTID BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_DIMMATERULEBILL' AND KSQL_COL_NAME IN ('FUSERDEFINED4FIELDEXTID')) 
ALTER TABLE T_EB_DIMMATERULEBILL ADD (FUSERDEFINED4FIELDEXTID BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_DIMMATERULEBILL' AND KSQL_COL_NAME IN ('FUSERDEFINED5FIELDEXTID')) 
ALTER TABLE T_EB_DIMMATERULEBILL ADD (FUSERDEFINED5FIELDEXTID BIGINT DEFAULT 0 NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_DIMMATERULEBILL' AND KSQL_COL_NAME IN ('FUSERDEFINED6FIELDEXTID')) 
ALTER TABLE T_EB_DIMMATERULEBILL ADD (FUSERDEFINED6FIELDEXTID BIGINT DEFAULT 0 NOT NULL);




