ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barnett, Brian W." <bbarn...@scholarinc.com>
Subject Writing SQL Maps that support both SQL Server and Oracle
Date Fri, 21 Jan 2005 22:33:04 GMT
We have a web app that runs against SQL Server. All of our SQL maps are SQL
Server compliant. We now have to be able to support Oracle as well. (We
never thought it would happen... a mistake.)

Anyway, we are wondering if anyone has some general guidelines for writing
SQL Maps so that they run against both databases. Before you get scared and
close this email, let me say we're not looking for a list of differences
between the two databases, and how to resolve those differences. We already
have a doc that explains those things.

The first issue we have run into is the CONVERT and CAST functions of SQL
Server. We make use of them in our SQL maps. We are debating on whether we
should take them out and do the conversion or casting in java code or pass a
parameter to the SQL map indicating SQL Server or Oracle and then have a
<dynamic> element that generates the appropriate CONVERT or CAST syntax.

All input is welcome.

Thank you,
Brian Barnett

View raw message