Unload float with zero value
Posted in 2001
Topics: Migration, Import/Export & Data Conversion, Third-Party Tools & Monitoring
Hi all,
Maybe someone else already had this problem and hopefully a solution
too.
When we do an unload with a select as:
unload to "myfile"
select .....
the float fields that have a zero value show as 0.000000E+00 in the
unloaded file, even if I use the DBFLTMASK environment variable ( but
show correctly with the same select without unloading).
This is with Sql 7.3 on Sco.
TIA
Luc Chatelain
Luc Chatelain wrote in message <3A802389.4547720D@cam.org>...
>
> When we do an unload with a select as:
>
> unload to "myfile"
> select .....>
> the float fields that have a zero value show as 0.000000E+00 in the
>unloaded file, even if I use the DBFLTMASK environment variable ( but
>show correctly with the same select without unloading).
>
>This is with Sql 7.3 on Sco.
>
Hmmm - "Luc" - you may be French. So what? You may be using FourJays (local
market - ahh)
Here's an answer from left-field - don't bother read on if you aren't using
FourJays.
There was a bug in 4JS where it wrote zero's back to the database with a
shakey bit in there. According to the meanings of the bits, it was still
zero, BUT the problem we saw was:
select da, dada, dah from tab
where key = 0
would fail! The query started working when we wrote
where key + 0 = 0
because the addition would clean up the bits.
We could also clean up the columns with
update tab set key = key + 0
but that's a nuicance and not something you want to run all the time (he
says with great understatement).
I wouldn't be surprised if this same bug messed up formatting in a few
places.