IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_CONTRACTPROJECT' AND KSQL_COL_NAME ='FSRCBILLTYPE')
ALTER TABLE T_ER_CONTRACTPROJECT ADD (FSRCBILLTYPE VARCHAR(200) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_CONTRACTPROJECT' AND KSQL_COL_NAME ='FPROJECTBILLNO')
ALTER TABLE T_ER_CONTRACTPROJECT ADD (FPROJECTBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL　);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_CONTRACTPROJECT' AND KSQL_COL_NAME ='FPROJECTNAME')
ALTER TABLE T_ER_CONTRACTPROJECT ADD (FPROJECTNAME VARCHAR(50) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_CONTRACTPROJECT' AND KSQL_COL_NAME ='FPROJECTDATE')
ALTER TABLE T_ER_CONTRACTPROJECT ADD (FPROJECTDATE DATETIME );
-- 字段长度100 - 500
EXEC p_AlterColumn 'T_ER_CONTRACTPROJECT', 'FPROJECTDESCRIPTION', 'NVARCHAR(500)', 'NOT NULL', '0100', ''' ''';
