PLM 初始化通过 ERP 物料同步到PLM,发现同步问题,需要重新初始化同步,删除原数据代码:
DELETE FROM T_PLM_PDM_BASE
DELETE FROM T_PLM_PDM_BASE_0
DELETE FROM T_PLM_PDM_BASE_1
DELETE FROM T_PLM_PDM_BASE_A
DELETE FROM T_PLM_PDM_BASE_B
DELETE FROM T_PLM_PDM_BASE_C
DELETE FROM T_PLM_PDM_BASE_D
DELETE FROM T_PLM_PDM_BASE_E
DELETE FROM T_PLM_PDM_BASE_L
DELETE FROM T_PLM_PDM_BASE_M
DELETE FROM T_PLM_PDM_BASE_P
DELETE FROM T_PLM_PDM_BASE_R
DELETE FROM T_PLM_PDM_BASE_T
DELETE FROM T_PLM_PDM_BASE_X
DELETE FROM T_PLM_PDM_BASEVERSION
DELETE FROM T_PLM_PDM_BASEVERSION_0
DELETE FROM T_PLM_PDM_BASEVERSION_1
DELETE FROM T_PLM_PDM_BASEVERSION_A
DELETE FROM T_PLM_PDM_BASEVERSION_B
DELETE FROM T_PLM_PDM_BASEVERSION_C
DELETE FROM T_PLM_PDM_BASEVERSION_D
DELETE FROM T_PLM_PDM_BASEVERSION_E
DELETE FROM T_PLM_PDM_BASEVERSION_L
DELETE FROM T_PLM_PDM_BASEVERSION_M
DELETE FROM T_PLM_PDM_BASEVERSION_P
DELETE FROM T_PLM_PDM_BASEVERSION_R
DELETE FROM T_PLM_PDM_BASEVERSION_T
DELETE FROM T_PLM_PDM_BASEVERSION_X
默认的初始化通过 ERP 物料同步到PLM 的物料状态是 归档状态,需要通过数据库 修改为 提交状态才能进行删除。
UPDATE T_PLM_PDM_BASE SET FLIFECIRCLESTAGE='AJ' WHERE FID IN (SELECT FID FROM T_PLM_PDM_BASE_M WHERE FERPMATERIALID!=0)
推荐阅读