Solved

ORA-01432 error

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

 

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

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.

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

777 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