Re: converting from long to double



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 <new table name> (colA, colB, colC)
SELECT colA, colB, Val(colC)
FROM <old table name>

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 <at> earthlink <decimal-point> 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/XwCdE8LrW3ykVnbBMaYa8KigAmU4MeIAn1Q+
5lTUXLNy7JerrkiISfMXeAHS
=qGRG
-----END PGP SIGNATURE-----
.



Relevant Pages

  • Re: PHP/MySQL - Splitting similar data to two tables and querying as a whole
    ... > data - previous years stuff, which is only used in queries <5% of the ... select colA, colB, colC ...
    (comp.lang.php)
  • Re: Query Error
    ... INSERT INTO (colA, colB, colC) ... but I am getting an error message: runtime error 3134: SYNTAX ERROR IN INSERT INTO statement. ...
    (microsoft.public.access.queries)
  • Re: id record for each table
    ... row ordering the rows by colA, colB descending, colC, where (colA, colB, ... No identity field but just a internal flag or hide field which computes each record. ...
    (microsoft.public.sqlserver.programming)
  • Re: Join on alias field values on-the-fly
    ... Ohh becuase we can have a scenario where there is other things in ColC ... where ColA and ColB match. ... So use that in your join: draw a line from ColA to ColA, and from ColB ...
    (comp.databases.ms-access)
  • Re: Optimizer Issues with 10.00.xC8
    ... That would sidestep the low selectivity of the colC index. ... We have some queries that search based on ColA, some that search based on ColA and ColC combined, and some that search on ColC alone. ... I, and several other customers, complained about the problem and one of the big advances in the optimizer in 7.31/9.30 was for the engine to delay the final calculations of cost for these queries until it had the replacement values at cursor open/execute time. ... this _only_ appears to be the case if there are distributions on the table. ...
    (comp.databases.informix)