/*主表添加通用字段*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_BILLTYPE' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_ER_BILLTYPE ADD (FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEITEM' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_ER_EXPENSEITEM ADD (FNAME VARCHAR(100) DEFAULT ' ' NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEITEM' AND KSQL_COL_NAME ='FFULLNAME') 
 ALTER TABLE T_ER_EXPENSEITEM ADD (FFULLNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEITEMBILL' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_ER_EXPENSEITEMBILL ADD (FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEITEMPIC' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_ER_EXPENSEITEMPIC ADD (FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
 
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TAXCLASSCODE' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_ER_TAXCLASSCODE ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TAXCLASSCODE' AND KSQL_COL_NAME ='FSIMPLENAME') 
 ALTER TABLE T_ER_TAXCLASSCODE ADD (FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TAXCLASSCODE' AND KSQL_COL_NAME ='FFULLNAME') 
 ALTER TABLE T_ER_TAXCLASSCODE ADD (FFULLNAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TAXCLASSCODE' AND KSQL_COL_NAME ='FKEY') 
 ALTER TABLE T_ER_TAXCLASSCODE ADD (FKEY NVARCHAR(2000) DEFAULT ' ' NOT NULL );
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TAXCLASSCODE' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_ER_TAXCLASSCODE ADD (FDESCRIPTION NVARCHAR(2000) DEFAULT ' ' NOT NULL );
 