Subject | Re: [ib-support] External tables and null values |
---|---|
Author | Ann W. Harrison |
Post date | 2002-12-23T17:25:31Z |
At 02:56 PM 12/23/2002 +0100, Milan Babuskov wrote:
so they turn into zeros or empty strings. Zero as a date
resolves to the "base date" which is 17 November 1858. It's
a VAX thing...
is to have two physical fields for each logical field. The first
is a byte (a bit in the database) that indicates whether or
not the value is null. The second is the data itself. This
complicates the logic of dumping to and reading from the
external file, but has the advantage of getting the right
answer.
Regards,
Ann
www.ibphoenix.com
We have answers.
>Hi all,And strings become "".
>
>I'm trying to copy data from one database to the other via external
>tables. I have problem with null values. ... all NULL
>values are converted:
>
>integers become zero
>dates become 17.11.1858
>Is this behaviour expected?Yes. An external file has no direct way to represent nulls,
so they turn into zeros or empty strings. Zero as a date
resolves to the "base date" which is 17 November 1858. It's
a VAX thing...
>If so, how to overcome it?What's done in gbak, the SQLDA - and, in fact, in the database
is to have two physical fields for each logical field. The first
is a byte (a bit in the database) that indicates whether or
not the value is null. The second is the data itself. This
complicates the logic of dumping to and reading from the
external file, but has the advantage of getting the right
answer.
Regards,
Ann
www.ibphoenix.com
We have answers.