IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_ORDINARY_ITEM' AND KSQL_COL_NAME ='FWRITEOFFQTY')
 ALTER TABLE T_RIM_INV_ORDINARY_ITEM ADD (FWRITEOFFQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_ORDINARY_ITEM' AND KSQL_COL_NAME ='FUNWRITEOFFQTY')
 ALTER TABLE T_RIM_INV_ORDINARY_ITEM ADD (FUNWRITEOFFQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_SPECIAL_ITEM' AND KSQL_COL_NAME ='FWRITEOFFQTY')
 ALTER TABLE T_RIM_INV_SPECIAL_ITEM ADD (FWRITEOFFQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_SPECIAL_ITEM' AND KSQL_COL_NAME ='FUNWRITEOFFQTY')
 ALTER TABLE T_RIM_INV_SPECIAL_ITEM ADD (FUNWRITEOFFQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_ELECTRIC_ITEM' AND KSQL_COL_NAME ='FWRITEOFFQTY')
 ALTER TABLE T_RIM_INV_ELECTRIC_ITEM ADD (FWRITEOFFQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INV_ELECTRIC_ITEM' AND KSQL_COL_NAME ='FUNWRITEOFFQTY')
 ALTER TABLE T_RIM_INV_ELECTRIC_ITEM ADD (FUNWRITEOFFQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );