The error comes from the first statement where you try to fetch values multiple rows while the receiving variables (
V_CURRENT_DATE, V_DATE_ENCAN
) can hold only a single value.
But beyond that, as far as I can see the
WHERE
clause of the
UPDATE
statement is based purely on the received single variable values, you do not use any columns to restrict the rows. In other words, the
UPDATE
statement would update all rows or no rows at all, depending on the values....
So if the idea is to is to do the update based on the values of individual rows, try something like
CREATE OR REPLACE PROCEDURE TP3_SP_ARCHIVER_ENCAN
IS
BEGIN
UPDATE TP2_ENCAN
SET EST_ARCHIVEE_ENC = 1,
STATUT_ENC = 'Archivé'
WHERE SYSDATE - DATE_FIN_EN > 60;
END TP3_SP_ARCHIVER_ENCAN;
/