
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CROSSSET' AND KSQL_COL_NAME ='FCROSSFLAGCONTENTDESC') 
ALTER TABLE T_MSPLAN_CROSSSET ADD (FCROSSFLAGCONTENTDESC NVARCHAR(2000) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CROSSSET' AND KSQL_COL_NAME ='FCROSSFLAGDETAILDESC') 
ALTER TABLE T_MSPLAN_CROSSSET ADD (FCROSSFLAGDETAILDESC NVARCHAR(2000) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CROSSSET' AND KSQL_COL_NAME ='FCROSSFCONE') 
ALTER TABLE T_MSPLAN_CROSSSET ADD (FCROSSFCONE NVARCHAR(2000) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_CROSSSET' AND KSQL_COL_NAME ='FCROSSFCDESCONE') 
ALTER TABLE T_MSPLAN_CROSSSET ADD (FCROSSFCDESCONE NVARCHAR(2000) DEFAULT ' ' NOT NULL );

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

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

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


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

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

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

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

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

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


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