Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> HELP!!! BEGINNER PL/SQL QUESTION
I apologize for the very large distribution of this message. I hope someone
out here can help. I am writing a stored procedure that extracts data from a
staging table, scrubs it and pushes it in several target tables. The
procedure works fine but spits out at random some rows and return this error
message: "Ora 01422: exact fetch returns more than requested # of rows."
The Oracle documentation doesn't say much about the meaning of this error. Can someone please provide me with some insight as to what could be the reason of this error?? My code is structured as such:
Begin cursor declaration
select
var1
var2
...
from staging_table
End cursor declaration
Begin data scrubing
...
End data scrubing
Begin scrubed data push to target tables <-- suspected area of error
...
End scrubed data push to target tables
I am guessing that this error may be due to the fact that I am declaring less variables in my cursor (or in my data scrubing code) than I insert into my target tables. Unless this is the other way around? Am I wrong? How can I fix this problem? Help!!! I'll use any assistance as this problem is driving me nuts!!!
Thanks in advance for your time and your patience!!!
--
Alan. (Remove NOSPAM to reply to me directly).
![]() |
![]() |