• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1255
  • Last Modified:

ORA-01002: fetch out of sequence

I'm using TOAD and trying the export the results of a query but keep getting this error.
0
error_prone
Asked:
error_prone
1 Solution
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
i am not sure because i never got this error and never heard that toad can give this error.

may be exit/restart your toad and try.

Is this issue happening all the time only for a particular query ?
is this issue happening for all queries ?

Thanks
0
 
SujithData ArchitectCommented:
What is the query?
Which version of TOAD?
0
 
error_proneAuthor Commented:
It happens when I change the parameter to a certain month in the query.  A different parameter works fine, but it errors out on others.  Restarting TOAD does not help.
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
error_proneAuthor Commented:
Version 8.1.7.  It's not the query because I get the error on even a simple select all.
0
 
error_proneAuthor Commented:
The error is occuring I think because of a bad date value.  I checked the View's code and tried running it and got a "date not valid for month specified".  Is there a way to weed out invalid dates in the where clause?
0
 
SujithData ArchitectCommented:
Are you trying to change the parameters before the completion of the query?
0
 
error_proneAuthor Commented:
Yes.
0
 
error_proneAuthor Commented:
Basically, my question is how do you resolve an invalid month error???
0
 
SujithData ArchitectCommented:
Changing the parameters before the completion of the query will lead to re-binding of values. It can lead to 1002 error.

>> how do you resolve an invalid month error??
What is the data type of your column? What is the expected format of data?
0
 
error_proneAuthor Commented:
It says Date.  It's being formatted in the view as 'MM/DD/YYYY'.
0
 
error_proneAuthor Commented:
So if certain records in this table are an invalid date then how do you resolve it?
0
 
SujithData ArchitectCommented:
>> if certain records in this table are an invalid date then how do you resolve it?
How can invalid date get into a date column?

Are you giving an invalid date in the where clause?
0
 
error_proneAuthor Commented:
Why not?  That's what it says here?  If not then why would it error out on certain parameters and not on others.  There's no date in the where clause.  All the parameters in the where clause are of type char.

http://www.experts-exchange.com/Database/Oracle/Q_22146001.html?sfQueryTermInfo=1+error+invalid+month
0
 
SujithData ArchitectCommented:
>> That's what it says here?
If you take a look at that link, they are applying a to_date function to two columns. That means the columns are "NOT OF TYPE DATE". And it has data not in the proper format.

TO_DATE (b.plannedstart_1, 'MM/DD/YYYY HH24:MI:SS') >=
                             TO_DATE (a.release_date, 'MM/DD/YYYY HH24:MI:SS')

If you are really looking for any help here. You should provide the query and the definition of the view.
0
 
Computer101Commented:
Forced accept.

Computer101
Community Support Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now