ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Dare" <rd...@comerxia.com>
Subject RE: SQL With Oracle Functions:
Date Mon, 06 Dec 2004 15:42:22 GMT

Nevermind.  I solved this with the following:

      select 
            PO.ORDER_ID , 
            to_char(PO.DATE_CREATED, 'yyyy-mm-dd HH24:mi:ss') as
MY_DATE, 
      FROM
            MY_PO_TABLE PO
      WHERE
            PO.ORDER_ID=#value#

and accessed the result as "MY_DATE".

Thanks anyway,

Rob.




> 
> I have tried many variations of the following SQL,
> and each time I get an "Invalid column name" exception.
> 
> <select id="getMyData"
>         parameterClass="java.lang.String"
>         resultClass="MyCustomClass">
>     <![CDATA[
>         select 
>               PO.ORDER_ID , 
>               to_char(PO.DATE_CREATED, 'yyyy-mm-dd HH24:mi:ss') , 
>         FROM
>               MY_PO_TABLE PO
>         WHERE
>               PO.ORDER_ID=#value#
>     ]]>
> </select>
> 
> This query works when run from JDBC, using PreparedStatement 
> and accessing the ResultSet via a rs.getString("PO.DATE_CREATED");
> 
> I am using Oracle 8i, iBATIS 2.0.8 and Tomcat 5.0.28.
> 
> I couldn't find anything about this in the iBATIS docs or 
> in Google.
> 
> Thanks!
> 
> Rob.
> 

Mime
View raw message