jiechu Posted October 22, 2008 Share Posted October 22, 2008 HiI have a question for the version of oracle 8i. If I create a new report in IReport and oracle 8i, such as with the sql is "select (case when $P{InputDate}=to_date('01/01/1970', 'mm/dd/yyyy') then X.birthday else $P{InputDate} end) as trueBirthdayfrom (select birthday from A) X".It will display "ORA-00932: inconsistent datatypes" and "at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)... " The enviroment is iReport 2.0.2, oracle client 10.2.0. In oracle, the column is Date type and in iReport the field is java.util.Date.If the oracle is 9i or 10g, it works fine.Does anybody know why it cannot work on oracle 8i and how to resolve it?Many thanks. Link to comment Share on other sites More sharing options...
ggalang Posted October 24, 2008 Share Posted October 24, 2008 its probably the version of the jdbc driver your using, oracle 8 should be shipped with a classes12.jar try that and remove the ojdbc.jar from your classpath. Link to comment Share on other sites More sharing options...
jiechu Posted October 24, 2008 Author Share Posted October 24, 2008 I have resolved it.in oracle , add trunc function for each $P{java.util.Date} if you only want Date not timestamp. Code:trunc($P{java.util.Date}). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now