Solved

ORA-01432 error

Posted on 1998-05-17
9
1,713 Views
Last Modified: 2012-06-27
I have the following error in my pro-c program.
(ORA-01423: error encountered while checking for extra rows in exact rows in exact fetch in "select no into :b0 from num@aaa"

num table has and will alway have 1 row of data only.  
The thing is that this error occurs at abnormal times.  At times, it is okay and at other times, the error occurs.
What could be the problem?   This seems to happen after I added the dblink.  Could this affect it?
0
Comment
Question by:Rita060297
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 3

Expert Comment

by:vlad_impala
ID: 1081135
The db link will affect it if you do not have the permissions you need.  Are you sure you have the appropriate (SELECT) permissions on "num@aaa", can you select from it via SQL*Plus?
0
 
LVL 1

Expert Comment

by:yesnaud
ID: 1081136
You should get a following error. Check the error stack, and then take the appropriate action...

YOann.
0
 
LVL 1

Expert Comment

by:csomu
ID: 1081137
Hi Rita,

Check your alert log file.It will have the error messages.

Run this program and check the alert log immedialtey , You should have more details as to why this is happening.I also supsect that it is due to your permission problems of the database link.

Bye
Somu
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Author Comment

by:Rita060297
ID: 1081138
I am able to select statement from SQLPLUS without any errors.

There was no alert log when I ran my program again with this error.

I've removed the dblink in my program and so far the error has not occurred since.   I need to have the dblink in my program.  Was the error related to the dblink?  

0
 
LVL 1

Expert Comment

by:csomu
ID: 1081139
Hi Rita,

I think you might not have handled the logic correctly did you check that you have only one record always or do you have more record sometimes , which has not been handled properly.

Bye
Somu
0
 

Author Comment

by:Rita060297
ID: 1081140
The table always has only one record.  Is there other syntax for selecting only one row from the table?  The table does not have any primary key at all.   The table has a number will increment  and a timestamp.
0
 
LVL 4

Expert Comment

by:sganta
ID: 1081141
>The table always has only one record.  Is there other syntax for selecting only one row  >from the
 > table?  The table does not have any primary key at all.   The table has a number will
  >    increment  and a timestamp.

Hai Rita

To select always one row from the table include ROWNUM = 1 in WHERE condition
i.e.,
"select no
    into :b0 from num@aaa WHERE ROWNUM = 1;"
I hope this will work.
JESUS LOVES YOU - sganta
0
 
LVL 4

Accepted Solution

by:
sganta earned 50 total points
ID: 1081142

       > table?  The table does not have any primary key at all.   The table has a number will
        >    increment  and a timestamp.

      Hai Rita

      To select always one row from the table include ROWNUM = 1 in WHERE condition
      i.e.,
      "select no
          into :b0 from num@aaa WHERE ROWNUM = 1;"
      I hope this will work.
      JESUS LOVES YOU - sganta

0
 
LVL 3

Expert Comment

by:mgokman
ID: 1081143
The "solution" given by sganta does not resolve the problem. If the table realy has only one row, then there is no need to use ROWNUM=1. However, if there is more than one row in the table, or the wrong table is being accessed, then limiting your select by ROWNUM=1 will only hide the real problem. I'd suggest that you check if the right table is always accessed and that it always has one row. To make sure it contains only one row, you may want to add to it a unique field and define a PK constraint on it. This may help you make sure there is only one record in this table.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question