/**Begin D:\pdm\PDM_UPGRADE\pdm_new\RIM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_EXPENSE_TYPE' AND KSQL_COL_NAME ='FOPERATE_ATTACH_QRCODE') 
 ALTER TABLE T_RIM_EXPENSE_TYPE ADD (FOPERATE_ATTACH_QRCODE NVARCHAR(10) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_EXPENSE_TYPE' AND KSQL_COL_NAME ='FOPERATE_ATT_QRCODE_TYPE') 
 ALTER TABLE T_RIM_EXPENSE_TYPE ADD (FOPERATE_ATT_QRCODE_TYPE NVARCHAR(10) DEFAULT ' ' NOT NULL );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_HIS_SYNC_LOG' AND KSQL_COL_NAME ='FDATA_DATE_END') 
 ALTER TABLE T_RIM_HIS_SYNC_LOG ADD (FDATA_DATE_END DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_HIS_SYNC_LOG' AND KSQL_COL_NAME ='FAPPID') 
 ALTER TABLE T_RIM_HIS_SYNC_LOG ADD (FAPPID VARCHAR(20) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_HIS_SYNC_LOG' AND KSQL_COL_NAME ='FDATA_DATE_START') 
 ALTER TABLE T_RIM_HIS_SYNC_LOG ADD (FDATA_DATE_START DATETIME );

/**End D:\pdm\PDM_UPGRADE\pdm_new\RIM_table.sql **/
