
CREATE OR ALTER PROCEDURE MIG_CORRECT_EO_RT_SYS_CMD_Sp
AS BEGIN 

DELETE FROM MIG_CORRECT_EO_RT_SYS_CMD

INSERT INTO MIG_CORRECT_EO_RT_SYS_CMD (EO_ID, ROUTE_ID, STEP_ID, SYSTEM_CMD_TEXT, NEW_SYSTEM_CMD_TEXT)
SELECT DISTINCT ERS1.EO_ID, ERS1.ROUTE_ID , ERS1.STEP_ID, ERS1.SYSTEM_CMD_TEXT, '' NEW_SYSTEM_CMD_TEXT
FROM EO_RT_SYST_STP  ERS1 

END