/**Begin D:\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\RIM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_AIR_ELE' AND KSQL_COL_NAME ='FAUTHENTICATE_FLAG') 
 ALTER TABLE T_RIM_INV_AIR_ELE ADD (FAUTHENTICATE_FLAG NVARCHAR(2) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_AIR_ELE' AND KSQL_COL_NAME ='FAUTHENTICATE_TIME') 
 ALTER TABLE T_RIM_INV_AIR_ELE ADD (FAUTHENTICATE_TIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_AIR_ELE' AND KSQL_COL_NAME ='FSELECT_TIME') 
 ALTER TABLE T_RIM_INV_AIR_ELE ADD (FSELECT_TIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_AIR_ELE' AND KSQL_COL_NAME ='FMANAGE_STATUS') 
 ALTER TABLE T_RIM_INV_AIR_ELE ADD (FMANAGE_STATUS NVARCHAR(2) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_AIR_ELE' AND KSQL_COL_NAME ='FRECORDED_MXUUID')
ALTER TABLE T_RIM_INV_AIR_ELE ADD (FRECORDED_MXUUID NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_AIR_ELE' AND KSQL_COL_NAME ='FRECORDED_RZUUID')
ALTER TABLE T_RIM_INV_AIR_ELE ADD (FRECORDED_RZUUID NVARCHAR(100) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_AIR_ELE' AND KSQL_COL_NAME ='FTAX_RECORDED_STATUS')
ALTER TABLE T_RIM_INV_AIR_ELE ADD (FTAX_RECORDED_STATUS NVARCHAR(2) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_AIR_ELE' AND KSQL_COL_NAME ='FTAX_RECORDED_PURPOSE')
ALTER TABLE T_RIM_INV_AIR_ELE ADD (FTAX_RECORDED_PURPOSE NVARCHAR(2) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_AIR_ELE' AND KSQL_COL_NAME ='FTAX_RECORDED_TIME')
ALTER TABLE T_RIM_INV_AIR_ELE ADD (FTAX_RECORDED_TIME DATETIME );

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