CREATE
OR REPLACE PROCEDURE RPADOWNLOADMANAGEDATA AS CURSOR C_DB IS SELECT
SCENECODE,
VERSION,
MAX( UGID ) AS UGID,
MAX( YHDM ) AS YHDM,
MAX( XSMC ) AS XSMC,
MAX( ORGNAME ) AS ORGNAME,
MAX( APPPREMISE ) AS APPPREMISE
FROM
T_PORTAL_RPA_SCENE
GROUP BY
SCENECODE,
VERSION;
BEGIN
FOR SCENE IN C_DB
LOOP
UPDATE RPADOWNLOADMANAGE
SET UGID = SCENE.UGID,
YHDM = SCENE.YHDM,
XSMC = SCENE.XSMC,
ORGNAME = SCENE.ORGNAME,
ENUMID = SCENE.APPPREMISE
WHERE
ROBOTID = SCENE.SCENECODE
AND VERSION = SCENE.VERSION;
COMMIT;
END LOOP;
END;
CALL RPADOWNLOADMANAGEDATA ( );