

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


EXEC p_AlterColumn 'T_EB_ANALYSEVARSEL', 'FVARTYPE', 'NVARCHAR(50)', 'NOT NULL', '1111', ''' ''';


EXEC p_AlterColumn 'T_EB_JUDGECONDITIONENTRY', 'FWORDDISPLAY', 'VARCHAR(50)', 'NOT NULL', '1111', ''' ''';

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

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

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


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


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



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

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_JUDGECONDITIONENTRY' AND KSQL_COL_NAME ='FSEQ') 
ALTER TABLE T_EB_JUDGECONDITIONENTRY ADD (FSEQ BIGINT DEFAULT 0 NOT NULL);