/*事后分摊规则字段*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSESHARERULE' AND KSQL_COL_NAME ='FSHAREWAITSEQ')
 ALTER TABLE T_ER_EXPENSESHARERULE ADD (FSHAREWAITSEQ INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSESHARERULE' AND KSQL_COL_NAME ='FSHAREWAITID')
 ALTER TABLE T_ER_EXPENSESHARERULE ADD (FSHAREWAITID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSESHARERULE' AND KSQL_COL_NAME ='FSHARECURRENCY')
 ALTER TABLE T_ER_EXPENSESHARERULE ADD (FSHARECURRENCY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSESHARERULE' AND KSQL_COL_NAME ='FSHAREAMOUNT')
 ALTER TABLE T_ER_EXPENSESHARERULE ADD (FSHAREAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSESHARERULE' AND KSQL_COL_NAME ='FSHAREAPPAMOUNT')
 ALTER TABLE T_ER_EXPENSESHARERULE ADD (FSHAREAPPAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYRESHARERULE' AND KSQL_COL_NAME ='FSHAREWAITSEQ')
 ALTER TABLE T_ER_DAILYRESHARERULE ADD (FSHAREWAITSEQ INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYRESHARERULE' AND KSQL_COL_NAME ='FSHAREWAITID')
 ALTER TABLE T_ER_DAILYRESHARERULE ADD (FSHAREWAITID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYRESHARERULE' AND KSQL_COL_NAME ='FSHARECURRENCY')
 ALTER TABLE T_ER_DAILYRESHARERULE ADD (FSHARECURRENCY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYRESHARERULE' AND KSQL_COL_NAME ='FSHAREAMOUNT')
 ALTER TABLE T_ER_DAILYRESHARERULE ADD (FSHAREAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYRESHARERULE' AND KSQL_COL_NAME ='FSHAREAPPAMOUNT')
 ALTER TABLE T_ER_DAILYRESHARERULE ADD (FSHAREAPPAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );


 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBLICRESHARERULE' AND KSQL_COL_NAME ='FSHAREWAITSEQ')
  ALTER TABLE T_ER_PUBLICRESHARERULE ADD (FSHAREWAITSEQ INT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBLICRESHARERULE' AND KSQL_COL_NAME ='FSHAREWAITID')
  ALTER TABLE T_ER_PUBLICRESHARERULE ADD (FSHAREWAITID BIGINT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBLICRESHARERULE' AND KSQL_COL_NAME ='FSHARECURRENCY')
  ALTER TABLE T_ER_PUBLICRESHARERULE ADD (FSHARECURRENCY BIGINT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBLICRESHARERULE' AND KSQL_COL_NAME ='FSHAREAMOUNT')
  ALTER TABLE T_ER_PUBLICRESHARERULE ADD (FSHAREAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBLICRESHARERULE' AND KSQL_COL_NAME ='FSHAREAPPAMOUNT')
  ALTER TABLE T_ER_PUBLICRESHARERULE ADD (FSHAREAPPAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );


 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TRIPRESHARERULE' AND KSQL_COL_NAME ='FSHAREWAITSEQ')
  ALTER TABLE T_ER_TRIPRESHARERULE ADD (FSHAREWAITSEQ INT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TRIPRESHARERULE' AND KSQL_COL_NAME ='FSHAREWAITID')
  ALTER TABLE T_ER_TRIPRESHARERULE ADD (FSHAREWAITID BIGINT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TRIPRESHARERULE' AND KSQL_COL_NAME ='FSHARECURRENCY')
  ALTER TABLE T_ER_TRIPRESHARERULE ADD (FSHARECURRENCY BIGINT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TRIPRESHARERULE' AND KSQL_COL_NAME ='FSHAREAMOUNT')
  ALTER TABLE T_ER_TRIPRESHARERULE ADD (FSHAREAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TRIPRESHARERULE' AND KSQL_COL_NAME ='FSHAREAPPAMOUNT')
  ALTER TABLE T_ER_TRIPRESHARERULE ADD (FSHAREAPPAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );