/** 新增通用语言字段 **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_BFTRANSFER' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_MRP_BFTRANSFER ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CACULATELOG' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_MRP_CACULATELOG ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL ); 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DENIFIEXCINFO' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_MRP_DENIFIEXCINFO ADD (FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DPGROUP' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_MRP_DPGROUP ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL ); 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLANCALENDAR' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_MRP_PLANCALENDAR ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL ); 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_RSDATACONFIG' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_MRP_RSDATACONFIG ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_WASTERATIO' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_MRP_WASTERATIO ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_DATACONFIG' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_MSPLAN_DATACONFIG ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL ); 
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_DATACONFIGENTRY' AND KSQL_COL_NAME ='FFIELDNAME') 
 ALTER TABLE T_MSPLAN_DATACONFIGENTRY ADD (FFIELDNAME NVARCHAR(255) DEFAULT ' ' NOT NULL ); 
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_SYNCSETTINGS' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_MSPLAN_SYNCSETTINGS ADD (FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL );
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_DATAVERSION' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_MSPLAN_DATAVERSION ADD (FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL ); 
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_LINERULES' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_MSPLAN_LINERULES ADD (FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLANPROGRAM' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_MRP_PLANPROGRAM ADD (FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL );

-- 例外信息分组
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_EXCEPTIONGROUP' AND KSQL_COL_NAME ='FNAME')
ALTER TABLE T_MRP_EXCEPTIONGROUP ADD (FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL );