IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_LOG_DIFF_DIMUSER' AND KSQL_COL_NAME IN ('FDIMTYPEDESC')) 
 ALTER TABLE T_PERM_LOG_DIFF_DIMUSER ADD (FDIMTYPEDESC VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_LOG_DIFF_DIMUSER' AND KSQL_COL_NAME IN ('FSTARTTIME')) 
 ALTER TABLE T_PERM_LOG_DIFF_DIMUSER ADD (FSTARTTIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_LOG_DIFF_DIMUSER' AND KSQL_COL_NAME IN ('FENDTIME')) 
 ALTER TABLE T_PERM_LOG_DIFF_DIMUSER ADD (FENDTIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_LOG_DIFF_DIMRANGE' AND KSQL_COL_NAME IN ('FDIMTYPEDESC')) 
 ALTER TABLE T_PERM_LOG_DIFF_DIMRANGE ADD (FDIMTYPEDESC VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_LOG_DIFF_DIMFUNC' AND KSQL_COL_NAME IN ('FDIMTYPEDESC')) 
 ALTER TABLE T_PERM_LOG_DIFF_DIMFUNC ADD (FDIMTYPEDESC VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_LOG_DIFF_DIMFIELD' AND KSQL_COL_NAME IN ('FDIMTYPEDESC')) 
 ALTER TABLE T_PERM_LOG_DIFF_DIMFIELD ADD (FDIMTYPEDESC VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_LOG_DIFF_DIMNEWDR' AND KSQL_COL_NAME IN ('FDIMTYPEDESC')) 
 ALTER TABLE T_PERM_LOG_DIFF_DIMNEWDR ADD (FDIMTYPEDESC VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_LOG_DIFF_DIMNEWDRP' AND KSQL_COL_NAME IN ('FDIMTYPEDESC')) 
 ALTER TABLE T_PERM_LOG_DIFF_DIMNEWDRP ADD (FDIMTYPEDESC VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_LOG_DIFF_DIMDIS' AND KSQL_COL_NAME IN ('FDIMTYPEDESC')) 
 ALTER TABLE T_PERM_LOG_DIFF_DIMDIS ADD (FDIMTYPEDESC VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_LOG_DIFF_DIMROLE' AND KSQL_COL_NAME IN ('FDIMTYPEDESC')) 
 ALTER TABLE T_PERM_LOG_DIFF_DIMROLE ADD (FDIMTYPEDESC VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_LOG_DIFF_DIMROLE' AND KSQL_COL_NAME IN ('FSTARTTIME')) 
 ALTER TABLE T_PERM_LOG_DIFF_DIMROLE ADD (FSTARTTIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_LOG_DIFF_DIMROLE' AND KSQL_COL_NAME IN ('FENDTIME')) 
 ALTER TABLE T_PERM_LOG_DIFF_DIMROLE ADD (FENDTIME DATETIME );