Home » SQL & PL/SQL » SQL & PL/SQL » PL/SQL Cursor Fetch error
PL/SQL Cursor Fetch error [message #187745] Tue, 15 August 2006 06:36 Go to next message
miltony
Messages: 5
Registered: March 2006
Junior Member
I am using cursor with host arrays. I will repeatedly fetch rows 3 at a time. After fetching 300 rows, I am getting error with code 01002. Can anyone help me in solving this problem.


I also want to know, what is the maximum amount of data that we can fetch for a cursor.

Thanks in advance,
Milton Y.

[Updated on: Tue, 15 August 2006 06:42]

Report message to a moderator

Re: PL/SQL Cursor Fetch error [message #187746 is a reply to message #187745] Tue, 15 August 2006 06:41 Go to previous messageGo to next message
JSI2001
Messages: 1016
Registered: March 2005
Location: Scotland
Senior Member
Quote:

Can anyone help me in solving this problem.


The documentation is quite clear on this error. Have you tried looking there?

http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14219/e900.htm
Re: PL/SQL Cursor Fetch error [message #187748 is a reply to message #187746] Tue, 15 August 2006 06:44 Go to previous messageGo to next message
miltony
Messages: 5
Registered: March 2006
Junior Member
I was not able relate the document with the error I am getting. Can you please give some detail.
Re: PL/SQL Cursor Fetch error [message #187751 is a reply to message #187748] Tue, 15 August 2006 06:56 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
How many rows are there that can be returned in your query?
My guess would be that you are hitting cause 1) in the docs - you do a fecth, get the last row, and then try to fetch again.

Without seeing the code, and generally having more info, it's hard to be more specific.
Re: PL/SQL Cursor Fetch error [message #187759 is a reply to message #187748] Tue, 15 August 2006 07:17 Go to previous messageGo to next message
JSI2001
Messages: 1016
Registered: March 2005
Location: Scotland
Senior Member
Quote:

I was not able relate the document with the error I am getting

Click on the link and scroll down until you find your error number. (By the way it is error Ora-01002 Noe that they are actually negative numbers)

Jim

[Updated on: Tue, 15 August 2006 07:17]

Report message to a moderator

Re: PL/SQL Cursor Fetch error [message #187760 is a reply to message #187751] Tue, 15 August 2006 07:26 Go to previous messageGo to next message
miltony
Messages: 5
Registered: March 2006
Junior Member
There are 350 rows to be returned by the query.

I had loaded 290 rows from 350 into another database. It worked fine with the cursor. When I loaded another 10 rows from the remaining 60, it is giving error.

The code is such that a fetch into 174 columns with total record length 1060.
Re: PL/SQL Cursor Fetch error [message #187764 is a reply to message #187760] Tue, 15 August 2006 08:24 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Quote:

Without seeing the code, and generally having more info, it's hard to be more specific.

I can think of half a dozen things off the top of my head that you could have done.
Rather than go through them all one at a time, why don't you show us the code.

Even better, see if you can create a small test case that reproduces the problem. The odds are better than 50/50 that you'll discover the cause of the problem when you try to do that.
Previous Topic: Help Needed on Conditional Select Statement (CASE?)
Next Topic: Problem with Recompiling Invalid PLSQL Objects(ORA-04068)
Goto Forum:
  


Current Time: Thu Dec 08 16:19:55 CST 2016

Total time taken to generate the page: 0.14833 seconds