IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INVOICE' AND KSQL_COL_NAME ='FSALELIST_COMPLETE')
 ALTER TABLE T_RIM_INVOICE ADD (FSALELIST_COMPLETE NVARCHAR(10) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INVOICE' AND KSQL_COL_NAME ='FSALELIST_SUMPAGE')
 ALTER TABLE T_RIM_INVOICE ADD (FSALELIST_SUMPAGE INT DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_ATTACH' AND KSQL_COL_NAME ='FPAGESUM')
 ALTER TABLE T_RIM_ATTACH ADD (FPAGESUM INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_ATTACH' AND KSQL_COL_NAME ='FPAGENO')
 ALTER TABLE T_RIM_ATTACH ADD (FPAGENO INT DEFAULT 0 NOT NULL );
