ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Broderick, Kevin" <kevin.broder...@iona.com>
Subject RE: Select timestamp from db
Date Mon, 12 Dec 2005 12:34:05 GMT
What is "systimestamp"? I ran that query in sql*plus
and Oracle didn't know what it was, perhaps from another DB ?

-----Original Message-----
From: Andre Peterka [mailto:apeterka@nsdcom.de] 
Sent: 12 December 2005 12:27
To: user-java@ibatis.apache.org
Subject: Select timestamp from db

Hello all

I am having a problem retrieving the current timestamp from the DB (in
this case oracle):

  <select id="getDbDate" resultClass="java.sql.Timestamp">
   select systimestamp from dual

I get the follwing error:

--- The error occurred while applying a result map.  
--- Check the getDbDate-AutoResultMap.  
--- Check the result mapping for the 'SYSTIMESTAMP' property.  
--- Cause: java.sql.SQLException: Invalic columntype


  <select id="getDbDate" resultClass="java.util.Date">
   select sysdate from dual

Works fine.

Any help is appreciated.

Thanks in advance,

View raw message