Solved

ORA-01432 error

Posted on 1998-05-17
9
1,513 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
  • 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
 

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
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.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now