ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro <abose...@burrows.co.uk>
Subject Re: ibator best strategy with multiple table formats
Date Thu, 11 Feb 2010 19:10:33 GMT
Brilliant...thanks a million
Guy Rouillier wrote:
> On 2/11/2010 4:58 AM, A Bosetti wrote:
>> The external database is provided by the customers and is made up of
>> several tables (about 20) and it comes in two different formats (both
>> formats are on Oracle), one that uses timestamps and the other one that
>> uses a string representation of datetime. (Oracle 7 didnt have
>> timestamps apparently)
> Oracle 7??? That version of Oracle was released in 1992, and Oracle 
> ended support in 2000!  That was 10 years ago.  I'd suggest your 
> company not attempt to deal with databases 10 years past their 
> end-of-life.
> One idea is to obtain the Oracle version early in your program.  Pass 
> that version as a parameter to your SQL, and use an <if> condition to 
> do different things on the 3 columns that differ.  I imagine your 
> options are extremely limited for Oracle 7, which means that 
> "timestamp as a string" will have to be your least common 
> denominator.  So in the more recent version, do a to_char to convert 
> the timestamp into the same string format used by Oracle 7.  Then your 
> output column type is always string, and you can map it to your POJO 
> field.

To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org

View raw message