Date Format Question

hyp527

Registered User.
Local time
Today, 04:51
Joined
Jan 17, 2009
Messages
27
I have a set of data that's formatted "20030306" but when I input a parameter on that column such as >=Date()-180, I get an error that reads ODBC - call failed.

[Oracle][ODBC]ORA-00932: inconsistent datatypes: expected number got timestamp (#932).

What am I doing wrong? I have oracle client 10g. Shouldn't it support timestamp?

Thanks.
 
I have a set of data that's formatted "20030306" but when I input a parameter on that column such as >=Date()-180, I get an error that reads ODBC - call failed.

[Oracle][ODBC]ORA-00932: inconsistent datatypes: expected number got timestamp (#932).

What am I doing wrong? I have oracle client 10g. Shouldn't it support timestamp?

Thanks.



Several issues here.
  • Date()-180 Returns a Date and "20030306" is a String (or a Number if the Quotes were for distinction only).
  • Oracle indicates that the expected value is a Number, not a Date or a TimeStamp. Check the Definition of the Column.
I suspect that the column is formatted as Text and that Oracle wants a number. If that is not true, then check the type of Number and make sure it can be as big as 20030306.
 
I linked the table from an oracle table. In the data type in access it's indicated as a number.

Does that mean it needs to be rewritten in Oracle to represent a date? Is there a way to reformat?
 

Users who are viewing this thread

Back
Top Bottom