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.
>