Subject Re: [firebird-support] How to convert Firebird1.5 Dialect1 to Firebird2.0 Dialect3?
Author Helen Borrie
At 07:39 AM 19/03/2007, you wrote:
>Hi
>
>
>
>Any pointers of how to go about converting Firebird1.5 database with
>Dialect1 to Firebird2.0 database with Dialect3?
>
>
>
>I need to keep the Numeric(18,2) as Numeric(18,2)
>
>
>
>If I backup in Firebird1.5, then restore in Firebird2.0, then all
>Numeric(18,2) change to Integer fields, but still handle data correctly.
>
>However newly created integer fields don't hold nr's like 5.26, they round
>them off to 5.

Defining something as Numeric(18,2) is not the same as defining it as
integer. An integer type is numeric(9,0). A BigInt type is (18,0).

Converting 5.26 to integer makes it 5, not by rounding but by
truncation (because a scale of 0 means you want to disregard any
sub-integer parts).

Converting 5.26 to numeric(18,2) will make it 5.26. As it happens,
so will converting it to numeric (5,2) or numeric(9,2), which are
scale numbers with smallint and integer precision, respectively.

Amongst other things to watch for is DATE. The Dialect 1 DATE type
needs to be a TIMESTAMP in dialect 3. The dialect 3 DATE type is
date-only, so pumping your existing DATE values into a D3 DATE will
lose all the time data.

./heLen