--更新BOM版本规则的多选类型等字段的历史数据   
UPDATE T_BD_BOMVERSIONRULE  SET FMULTYPE = ',A,B,C,' WHERE FID = 780605109909666816 AND (FMULTYPE = '' OR FMULTYPE = ' ' OR FMULTYPE IS NULL);

UPDATE T_BD_BOMVERSIONRULE SET FMULTYPE = ',A,' WHERE FMULTYPE = ' ' OR FMULTYPE IS NULL;

--更新版本类型
UPDATE T_BD_BOMVERSION SET FTYPE = 'A' WHERE FTYPE = ' ' OR FTYPE IS NULL;
	 
IF NOT EXISTS (SELECT 1 FROM T_BD_BOMVERSIONRULE WHERE FISDEFAULT = '1')
UPDATE T_BD_BOMVERSIONRULE A SET FISDEFAULT = '1' WHERE FID = 780605109909666816;

IF NOT EXISTS (SELECT 1 FROM T_BD_BOMVERSIONRULE WHERE FISDEFAULTROUTE = '1')
UPDATE T_BD_BOMVERSIONRULE A SET FISDEFAULTROUTE = '1' WHERE FID = 780605109909666816;


IF NOT EXISTS (SELECT 1 FROM T_BD_BOMVERSIONRULE WHERE FISDEFAULTPROGRAME = '1')
UPDATE T_BD_BOMVERSIONRULE A SET FISDEFAULTPROGRAME = '1' WHERE FID = 780605109909666816;