IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYAPPLYDETAIL' AND KSQL_COL_NAME ='FFEECURRENCY') 
 ALTER TABLE T_ER_DAILYAPPLYDETAIL ADD (FFEECURRENCY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYAPPLYDETAIL' AND KSQL_COL_NAME ='FFEEEXCHANGERATE') 
 ALTER TABLE T_ER_DAILYAPPLYDETAIL ADD (FFEEEXCHANGERATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYAPPLYDETAIL' AND KSQL_COL_NAME ='FFEEQUOTETYPE') 
 ALTER TABLE T_ER_DAILYAPPLYDETAIL ADD (FFEEQUOTETYPE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYAPPLYDETAIL' AND KSQL_COL_NAME ='FCURCONTROLAMT') 
 ALTER TABLE T_ER_DAILYAPPLYDETAIL ADD (FCURCONTROLAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYAPPLYDETAIL' AND KSQL_COL_NAME ='FCUROTHERFEEAMOUNT') 
 ALTER TABLE T_ER_DAILYAPPLYDETAIL ADD (FCUROTHERFEEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYAPPLYDETAIL' AND KSQL_COL_NAME ='FCUROTHERCONTROLAMT') 
 ALTER TABLE T_ER_DAILYAPPLYDETAIL ADD (FCUROTHERCONTROLAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET_A' AND KSQL_COL_NAME ='FFEECURRENCY') 
 ALTER TABLE T_ER_PUBREIMEXPDET_A ADD (FFEECURRENCY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET_A' AND KSQL_COL_NAME ='FFEEEXCHANGERATE') 
 ALTER TABLE T_ER_PUBREIMEXPDET_A ADD (FFEEEXCHANGERATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET_A' AND KSQL_COL_NAME ='FFEEQUOTETYPE') 
 ALTER TABLE T_ER_PUBREIMEXPDET_A ADD (FFEEQUOTETYPE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET_A' AND KSQL_COL_NAME ='FCURCONTROLAMT') 
 ALTER TABLE T_ER_PUBREIMEXPDET_A ADD (FCURCONTROLAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET_A' AND KSQL_COL_NAME ='FCUROTHERFEEAMOUNT') 
 ALTER TABLE T_ER_PUBREIMEXPDET_A ADD (FCUROTHERFEEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET_A' AND KSQL_COL_NAME ='FCUROTHERCONTROLAMT') 
 ALTER TABLE T_ER_PUBREIMEXPDET_A ADD (FCUROTHERCONTROLAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEDETAIL_A' AND KSQL_COL_NAME ='FFEECURRENCY') 
 ALTER TABLE T_ER_EXPENSEDETAIL_A ADD (FFEECURRENCY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEDETAIL_A' AND KSQL_COL_NAME ='FFEEEXCHANGERATE') 
 ALTER TABLE T_ER_EXPENSEDETAIL_A ADD (FFEEEXCHANGERATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEDETAIL_A' AND KSQL_COL_NAME ='FFEEQUOTETYPE') 
 ALTER TABLE T_ER_EXPENSEDETAIL_A ADD (FFEEQUOTETYPE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEDETAIL_A' AND KSQL_COL_NAME ='FCURCONTROLAMT') 
 ALTER TABLE T_ER_EXPENSEDETAIL_A ADD (FCURCONTROLAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEDETAIL_A' AND KSQL_COL_NAME ='FCUROTHERFEEAMOUNT') 
 ALTER TABLE T_ER_EXPENSEDETAIL_A ADD (FCUROTHERFEEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEDETAIL_A' AND KSQL_COL_NAME ='FCUROTHERCONTROLAMT') 
 ALTER TABLE T_ER_EXPENSEDETAIL_A ADD (FCUROTHERCONTROLAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
 
