
--用量概率计算日志:物料转换
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_PROBABILITYLOG' AND KSQL_COL_NAME ='FMATERIALCHANGE')
ALTER TABLE T_MDS_PROBABILITYLOG ADD (FMATERIALCHANGE CHAR(1) NOT NULL DEFAULT '0');
--用量概率计算日志:备货项目
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_PROBABILITYLOG' AND KSQL_COL_NAME ='FBACKUPPROJECT')
ALTER TABLE T_MDS_PROBABILITYLOG ADD (FBACKUPPROJECT BIGINT NOT NULL DEFAULT 0);
--用量概率计算日志:统计维度
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_PROBABILITYLOG' AND KSQL_COL_NAME ='FCOUNTDIM')
ALTER TABLE T_MDS_PROBABILITYLOG ADD (FCOUNTDIM NVARCHAR(50) NOT NULL DEFAULT ' ');
--用量概率计算日志:分析维度
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_PROBABILITYLOG' AND KSQL_COL_NAME ='FANALYSISDIM')
ALTER TABLE T_MDS_PROBABILITYLOG ADD (FANALYSISDIM NVARCHAR(50) NOT NULL DEFAULT ' ');