Home » Developer & Programmer » Forms » multiple table query... exact fetch error
multiple table query... exact fetch error [message #81530] Thu, 27 February 2003 07:24 Go to next message
kim
Messages: 116
Registered: December 2001
Senior Member
good morning everyone!
i created a data block and based it on a join of two tables. when i try to run my form, it gives me this error:
ORA-01422 exact fetch returns more than requested number of rows
could someone please tell me what i'm doing wrong?
thanks :)
Re: multiple table query... exact fetch error [message #81532 is a reply to message #81530] Thu, 27 February 2003 10:11 Go to previous messageGo to next message
Julie
Messages: 98
Registered: February 2002
Member
Your query returns more than one row. So either you have a problem in your data, like a duplicate record that you can delete and prevent from happening again, or you have to create a cursor and process your query to expect the possibility of more than I row.
Run your query in sqlplus to see why you get more than 1 row. If the values selected are the same in all the rows returned, you could switch it from select, to select distinct and that would fix it too. Or, possibly you could select (max)whatever to limit your data to one row.
Re: multiple table query... exact fetch error [message #237470 is a reply to message #81532] Mon, 14 May 2007 10:37 Go to previous messageGo to next message
lavallee_g
Messages: 22
Registered: May 2005
Location: Quebec
Junior Member
You can also check if in your view you have something like

select a
from b
where c = (select d
from e
)

The error can come from the equal sign. To correct the error you can do:

select a
from b
where c in (select d
from e
)
Re: multiple table query... exact fetch error [message #237531 is a reply to message #237470] Mon, 14 May 2007 15:14 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
@lavallee_g, although there's nothing wrong in answering questions and solving problems, perhaps it would be a good idea to check topic age - this one is more than 4 (FOUR!) years old. I believe there are newer topics that wait to be answered.
Re: multiple table query... exact fetch error [message #237678 is a reply to message #237531] Tue, 15 May 2007 08:00 Go to previous messageGo to next message
lavallee_g
Messages: 22
Registered: May 2005
Location: Quebec
Junior Member
Your rigth, my bad.. I will be more carefull next time..

But maybe a clean-up to delete these old messages once in a while would help... 4 years it is a bit long don't you think?

Genevieve
Re: multiple table query... exact fetch error [message #237811 is a reply to message #237678] Tue, 15 May 2007 14:35 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As far as I'm concerned, I wouldn't delete any messages here.

However, if you think it is a good idea, go to the Suggestions & Feedback Forum, post a topic and see what other people (especially Frank Naude) have to say about it.
Re: multiple table query... exact fetch error [message #237877 is a reply to message #237811] Wed, 16 May 2007 01:18 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Unanswered messages that are four years old may be candidates, but answered messages are NOT candidates. Just because the question and answer are old does not make then wrong or not needed. There are way too many people out in the REAL world that are using VERY old versions of Forms and the old questions are still pertinent.

David
Previous Topic: Automatic message genarate for mobile
Next Topic: diplying tooltip programaticaly
Goto Forum:
  


Current Time: Fri Sep 27 00:15:53 CDT 2024