Hi,
Under Oracle 19 and APEX 24, I want to store multiples values from a select into one variable (TACHES) and send the value of this variable with a mail. This is the code:
DECLARE
TACHES VARCHAR2(4000);
begin
Select 'ID : ' || ID || 'Titre de la tâche : ' || TITRE || CHR(13) || CHR(13) INTO TACHES FROM AD_TACHE WHERE TACHE_TERMINEE = 'Non' ;
APEX_MAIL.SEND(
p_to => 'unknown@gmail.com',
p_from => 'unknown@dummydomain.com',
p_body => 'Tâches non terminées :'
|| CHR(13) || CHR(13) || TACHES
|| CHR(13) || CHR(13) || 'Ne pas répondre à ce courriel, il ne sera pas traité.',
p_subj => 'Tâches non terminées') ;
end;
When executing this automation on APEX, I get an error :
ORA-01422: Exact extraction returns more than the requested number of rows.
How to do to avoid this error ?
Best regards.