converting from long to double

converting from long to double

am 04.12.2007 19:24:26 von Sparks

After changing all the variables in a table from long to double.
you get 9.1====becomes==== 9.19999980926514
ok I checked microsoft and they had a workaround.
export the values to excel...then import them back into the new table.
well I tried that and get the same thing.
is there a work around for the work around LOL

Re: converting from long to double

am 04.12.2007 23:41:39 von MGFoster

sparks wrote:
> After changing all the variables in a table from long to double.
> you get 9.1====becomes==== 9.19999980926514
> ok I checked microsoft and they had a workaround.
> export the values to excel...then import them back into the new table.
> well I tried that and get the same thing.
> is there a work around for the work around LOL
>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

9.1 would not "fit" in a Long column. Longs are large Integers (no
decimals). So my guess is that you originally had a TEXT column w/
decimal numbers as the values.

One tedious way to change the text values to Double values would be to
create a new table that has the same columns as the original table,
except change the numbers Text column to a Double data type. Then
import all the rows from the original table into the new table using an
Append query - like this (say colC is the converting column):

INSERT INTO (colA, colB, colC)
SELECT colA, colB, Val(colC)
FROM

Then delete the old table (or rename it for safety's sake) and name the
new table w/ the old table's name.

--
MGFoster:::mgf00 earthlink net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBR1XXnoechKqOuFEgEQL/XwCdE8LrW3ykVnbBMaYa8KigAmU4MeIA n1Q+
5lTUXLNy7JerrkiISfMXeAHS
=qGRG
-----END PGP SIGNATURE-----

Re: converting from long to double

am 05.12.2007 01:22:30 von lyle

On Dec 4, 1:24 pm, sparks wrote:
> After changing all the variables in a table from long to double.
> you get 9.1====becomes==== 9.19999980926514
> ok I checked microsoft and they had a workaround.
> export the values to excel...then import them back into the new table.
> well I tried that and get the same thing.
> is there a work around for the work around LOL


try

http://www.braintransplants.com/

hth

Re: converting from long to double

am 05.12.2007 15:29:11 von Sparks

Yes you are correct. I went and looked at each variable and there are
203 variables. 14 of which are single, fixed, 1 and 9 text fields..
its the single to double that has the problem that I was talking
about.9.1 becomes 9.09999980926514 when its changed from single to
double.

Sorry about that it was my mistake, I thought that all the variables
were longs and did not think about how you get that value in a long.


On Tue, 04 Dec 2007 18:24:26 GMT, sparks wrote:

>After changing all the variables in a table from long to double.
>you get 9.1====becomes==== 9.19999980926514
>ok I checked microsoft and they had a workaround.
>export the values to excel...then import them back into the new table.
>well I tried that and get the same thing.
>is there a work around for the work around LOL