/**Begin D:\scm_code\PDM_UPGRADE_1.3\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm2\RIM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_EXPENSE' AND KSQL_COL_NAME ='FAPPID') 
 ALTER TABLE T_RIM_EXPENSE ADD (FAPPID NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_EXPENSE_TYPE' AND KSQL_COL_NAME ='FOPERATE_PERSON_INVOICE') 
 ALTER TABLE T_RIM_EXPENSE_TYPE ADD (FOPERATE_PERSON_INVOICE 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_QRCODE_TYPE') 
 ALTER TABLE T_RIM_EXPENSE_TYPE ADD (FOPERATE_QRCODE_TYPE 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_ENTER') 
 ALTER TABLE T_RIM_EXPENSE_TYPE ADD (FOPERATE_ENTER 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_QRCODE') 
 ALTER TABLE T_RIM_EXPENSE_TYPE ADD (FOPERATE_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_SAN_GUN') 
 ALTER TABLE T_RIM_EXPENSE_TYPE ADD (FOPERATE_SAN_GUN 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_SCANNER') 
 ALTER TABLE T_RIM_EXPENSE_TYPE ADD (FOPERATE_SCANNER 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_UPLOAD') 
 ALTER TABLE T_RIM_EXPENSE_TYPE ADD (FOPERATE_UPLOAD 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_COMPANY_INVOICE') 
 ALTER TABLE T_RIM_EXPENSE_TYPE ADD (FOPERATE_COMPANY_INVOICE NVARCHAR(10) DEFAULT ' ' NOT NULL );

/**End D:\scm_code\PDM_UPGRADE_1.3\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm2\RIM_table.sql **/
