Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ORA-01432 error

Posted on 1998-05-17
9
Medium Priority
?
1,872 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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

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 150 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to recover a database from a user managed backup

783 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