IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_REPORTEXTCOLUMN' AND KSQL_COL_NAME ='FSHOWSUMMARY') 
ALTER TABLE T_MSPLAN_REPORTEXTCOLUMN ADD (FSHOWSUMMARY CHAR(1) DEFAULT '0' NOT NULL);
 
 
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_REPORTEXTMODEL' AND KSQL_COL_NAME ='FFIELDAPPID') 
ALTER TABLE T_MSPLAN_REPORTEXTMODEL ADD (FFIELDAPPID NVARCHAR(50) DEFAULT ' ' NOT NULL);
 

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_REPORTEXTCOLUMN' AND KSQL_COL_NAME ='FISDYNAMICFIELD') 
ALTER TABLE T_MSPLAN_REPORTEXTCOLUMN ADD (FISDYNAMICFIELD CHAR(1) DEFAULT '0' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_REPORTEXTCOLUMN' AND KSQL_COL_NAME ='FFIELDPARAM') 
ALTER TABLE T_MSPLAN_REPORTEXTCOLUMN ADD (FFIELDPARAM NVARCHAR(255) DEFAULT ' ' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_REPORTEXTCOLUMN' AND KSQL_COL_NAME ='FFIELDPARAM_TAG') 
ALTER TABLE T_MSPLAN_REPORTEXTCOLUMN ADD (FFIELDPARAM_TAG NCLOB);
 