/**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_RELATION' AND KSQL_COL_NAME ='FPRESET_DEDUCTION_PURPOSE') 
 ALTER TABLE T_RIM_EXPENSE_RELATION ADD (FPRESET_DEDUCTION_PURPOSE NVARCHAR(2) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INVOICE' AND KSQL_COL_NAME ='FPRESET_DEDUCTION_PURPOSE') 
 ALTER TABLE T_RIM_INVOICE ADD (FPRESET_DEDUCTION_PURPOSE NVARCHAR(2) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INVOICE' AND KSQL_COL_NAME ='FRECEIVER') 
 ALTER TABLE T_RIM_INVOICE ADD (FRECEIVER BIGINT DEFAULT 0 NOT NULL );

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