Please find the SQL for bulk reposting content.
BEGIN
FOR x in (
SELECT
prcsinstance
FROM psprcsrqst
WHERE
diststatus = 4 -- Those are not posted
AND runstatus in (9,10,17) -- 9 successful processes,17
FOR WARNING,10 FOR NO SUCCESS
)
LOOP
UPDATE PSPRCSRQST
SET DISTSTATUS = '7'
WHERE PRCSINSTANCE = x.prcsinstance;
UPDATE PSPRCSQUE
SET DISTSTATUS = '7'
WHERE PRCSINSTANCE = x.prcsinstance;
UPDATE PS_CDM_LIST
SET DISTSTATUS = '8'
, TRANSFERINSTANCE = 0
WHERE PRCSINSTANCE = x.prcsinstance
AND DISTSTATUS
<> '5'; --posted
END LOOP;
END;
/
COMMIT
/
No comments:
Post a Comment