
--历史用量汇总表:转换前物料编码
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_HISUSERESULT' AND KSQL_COL_NAME ='FBEFOREMATERIALNUMBER')
ALTER TABLE T_MDS_HISUSERESULT ADD (FBEFOREMATERIALNUMBER NVARCHAR(2000) NOT NULL DEFAULT ' ');
--历史用量汇总表:转换前物料名称
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_HISUSERESULT' AND KSQL_COL_NAME ='FBEFOREMATERIALNAME')
ALTER TABLE T_MDS_HISUSERESULT ADD (FBEFOREMATERIALNAME NVARCHAR(2000) NOT NULL DEFAULT ' ');
--历史用量汇总表:转换前计量单位名称
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_HISUSERESULT' AND KSQL_COL_NAME ='FBEFOREUNITNAME')
ALTER TABLE T_MDS_HISUSERESULT ADD (FBEFOREUNITNAME NVARCHAR(2000) NOT NULL DEFAULT ' ');