SELECT * FROM SAL.VERSION_LOG ORDER BY LOG_ID DESC
--2001 3013 --3010
--2010 3012 --3009
--2003 3011 --3008
SELECT * FROM SAL.FORCAST_VERSION
UPDATE SAL.FORCAST_VERSION SET VERSION_STATUS='1',LOG_ID=3008 WHERE VERSION_ID=2003
UPDATE SAL.FORCAST_VERSION SET VERSION_STATUS='1',LOG_ID=3009 WHERE VERSION_ID=2010
UPDATE SAL.FORCAST_VERSION SET VERSION_STATUS='1',LOG_ID=3010 WHERE VERSION_ID=2001
DELETE FROM SAL.VERSION_LOG WHERE LOG_ID IN(3013,3012,3011)