IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_ENTITY' AND KSQL_COL_NAME ='FVIEWALIAS') 
 ALTER TABLE T_MSPLAN_ENTITY ADD (FVIEWALIAS NVARCHAR(50)  DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_ENTITY' AND KSQL_COL_NAME ='FVIEWID') 
 ALTER TABLE T_MSPLAN_ENTITY ADD (FVIEWID BIGINT DEFAULT 0 NOT NULL );
 
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CROSSCONTENT' AND KSQL_COL_NAME ='FCVIEWALIAS') 
 ALTER TABLE T_MSPLAN_CROSSCONTENT ADD (FCVIEWALIAS NVARCHAR(50) DEFAULT ' ' NOT NULL);
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CROSSCONTENT' AND KSQL_COL_NAME ='FCVIEWID') 
 ALTER TABLE T_MSPLAN_CROSSCONTENT ADD (FCVIEWID BIGINT DEFAULT 0 NOT NULL);
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CROSSCONTENT' AND KSQL_COL_NAME ='FLTYPE') 
 ALTER TABLE T_MSPLAN_CROSSCONTENT ADD (FLTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL);
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CROSSCONTENT' AND KSQL_COL_NAME ='FLTYPEONE') 
 ALTER TABLE T_MSPLAN_CROSSCONTENT ADD (FLTYPEONE NVARCHAR(50) DEFAULT ' ' NOT NULL);
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CROSSCONTENT' AND KSQL_COL_NAME ='FLTYPEONEWO') 
 ALTER TABLE T_MSPLAN_CROSSCONTENT ADD (FLTYPEONEWO NVARCHAR(50) DEFAULT ' ' NOT NULL);
 
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CROSSMOVEENTRY' AND KSQL_COL_NAME ='FTVIEWALIAS') 
 ALTER TABLE T_MSPLAN_CROSSMOVEENTRY ADD (FTVIEWALIAS NVARCHAR(50) DEFAULT ' ' NOT NULL);
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CROSSMOVEENTRY' AND KSQL_COL_NAME ='FTVIEWID') 
 ALTER TABLE T_MSPLAN_CROSSMOVEENTRY ADD (FTVIEWID BIGINT DEFAULT 0 NOT NULL);
 
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CROSSICONSET' AND KSQL_COL_NAME ='FICONCONDITION') 
 ALTER TABLE T_MSPLAN_CROSSICONSET ADD (FICONCONDITION NVARCHAR(200) DEFAULT ' ' NOT NULL);
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CROSSICONSET' AND KSQL_COL_NAME ='FICONCONDITIONVALUE') 
 ALTER TABLE T_MSPLAN_CROSSICONSET ADD (FICONCONDITIONVALUE NVARCHAR(255) DEFAULT ' ' NOT NULL);
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CROSSICONSET' AND KSQL_COL_NAME ='FICONCONDITIONVALUE_TAG') 
 ALTER TABLE T_MSPLAN_CROSSICONSET ADD (FICONCONDITIONVALUE_TAG NCLOB );
 
