Re: Zero floats are being unloaded as nulls
Posted in 1998
David Wrote ....
>I'm running the following:
>INFORMIX-OnLine Version 7.20.UC3
>under Digital UNIX V3.2F on an Alpha.
>
>My problem is that the "unload" command generates
>null fields (i.e., "||") for floating-point zero values.
>Since the fields are declared as not null,
>the ensuing "load" fails.
>
>The docs say it's supposed to write "0.00".
>On Solaris, it writes "0.000000e+00" which
>isn't what the doc says but at least it works.
>
>Is there a work-around? An update that fixes this?
>Please reply by email.
>Thanks!
>
>David Anderson
>anderson@icsi.berkeley.edu
>
Assuming that what you are saying is true and the unload gives you
problem for field f5 and you do not have any direct way to solve the
problem then the workaround would be as follows :
You unload the table in two passes :
pass 1. unload to t1.unl
select * from tab1
where f5 is not null
pass 2. unload to t2.unl
select f1, f2, f3, f4, 0.0, f6...
from tab1
where f5 is null
Then load the above two unload files and the job is done.
____________________________________________________________
Sunil Thakkar (sunil0@hotmail.com)
Independent Informxi Consultant
Last seen: DBA at Brooks AFB - Texas.
DBA Fox - There is alway a simple work around for any problem.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com