converting from long to double

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sparks

    converting from long to double

    After changing all the variables in a table from long to double.
    you get 9.1====becomes= === 9.1999998092651 4
    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

  • MGFoster

    #2
    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.1999998092651 4
    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:::mgf0 0 <atearthlink <decimal-pointnet
    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/AwUBR1XXnoechKq OuFEgEQL/XwCdE8LrW3ykVnb BMaYa8KigAmU4Me IAn1Q+
    5lTUXLNy7Jerrki ISfMXeAHS
    =qGRG
    -----END PGP SIGNATURE-----

    Comment

    • lyle

      #3
      Re: converting from long to double

      On Dec 4, 1:24 pm, sparks <jstal...@swbel l.netwrote:
      After changing all the variables in a table from long to double.
      you get 9.1====becomes= === 9.1999998092651 4
      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



      hth

      Comment

      • sparks

        #4
        Re: converting from long to double

        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.0999998092651 4 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 <jstalnak@swbel l.netwrote:
        >After changing all the variables in a table from long to double.
        >you get 9.1====becomes= === 9.1999998092651 4
        >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

        Comment

        Working...