As the error states, your query is returning more than one row, when a single row/value is expected, the options to resolve this error are:
1. Rewrite your SELECT INTO statement so that only one row is returned.
2. Replace your SELECT INTO statement with a cursor.
Additional helpful information about this error with examples of how to resolve it can be found at the link below –
Here is an example in PLSQL of the error. Notice that the data being returned clearly has more than one row. As was described above, a SELECT INTO is supposed to have one and only one row. If there is more than one row you get that error. So look in your code for a SELECT INTO and figure out why you are fetching more than one row.
2 v1 integer;
4 select c1
5 into v1
6 from (
7 select 1 c1 from dual
8 union all
9 select 2 c1 from dual
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at line 4</pre>