ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andre Peterka" <apete...@nsdcom.de>
Subject AW: Select timestamp from db
Date Mon, 12 Dec 2005 12:37:36 GMT
Kevin,

The timestamp datatype of Oracle which is supported as of Oracle 9i, I think.
It would be 'current timestamp' in DB2 and 'current_timestamp' for Postgres.

This is the output that my Oracle produces:
SQL Statement which produced this data:
  select systimestamp from dual

SYSTIMESTAMP
12.12.2005 13:36:23,377940 +01:00 

Cheers,
Andre 

> -----Urspr√ľngliche Nachricht-----
> Von: Broderick, Kevin [mailto:kevin.broderick@iona.com] 
> Gesendet: Montag, 12. Dezember 2005 13:34
> An: user-java@ibatis.apache.org
> Betreff: RE: Select timestamp from db
> 
> What is "systimestamp"? I ran that query in sql*plus and 
> Oracle didn't know what it was, perhaps from another DB ?
> Cheers,
> Kev
> 
> -----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
>   </select>
> 
> 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
> 
> Whereas 
> 
>   <select id="getDbDate" resultClass="java.util.Date">
>    select sysdate from dual
>   </select>
> 
> Works fine.
> 
> Any help is appreciated.
> 
> Thanks in advance,
> Andre
> 
> 
> 

Mime
View raw message