ORA-01422: exact fetch returns more than requested number of rows
Hello,
I have an issue where the following script returns ORA-01422.
my problem is that after handling the exception and checking my_row values, I found that it contains the values from the first record, and strangely did not store the date value.
/*CURRENT TABLE RECORDS*/
INSERT INTO test_table VALUES('A',TO_DATE('2022-03-29 00:00:00', 'YYYY-MM-DD HH24:MI:SS'));
INSERT INTO test_table VALUES('A',TO_DATE('2022-03-30 00:00:00', 'YYYY-MM-DD HH24:MI:SS'));
INSERT INTO test_table VALUES('B',TO_DATE('2022-03-29 00:00:00', 'YYYY-MM-DD HH24:MI:SS'));
/* ------------------- */
DECLARE
my_row test_table%ROWTYPE;