Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Location
    Europe
    Posts
    14

    Unanswered: 3086/3600 = 0.0 .... WHY??? Should be 0.857

    I have a float field in a table ... when I try and add the result of the following division ... 3086/3600 ... to that field it displays as 0.0.

    Can anyone explain why?

    Does anyone know how to get around this and get 0.857 into that field instead.

    I have tried changing the data type to Decimal(20,2) but this has had no effect.

    Any suggestions would be very much appreciated.

  2. #2
    Join Date
    Jan 2003
    Location
    Europe
    Posts
    14

    Re: 3086/3600 = 0.0 .... WHY??? Should be 0.857

    Solved it .... just do

    3086 / CAST(3600 AS FLOAT)

    and case solved

  3. #3
    Join Date
    Apr 2003
    Posts
    18

    Re: 3086/3600 = 0.0 .... WHY??? Should be 0.857

    Hi , Try this

    select 3086/3600.00

    will give u the desired result....

    Cheers
    Gola Munjal
    Originally posted by briansy
    I have a float field in a table ... when I try and add the result of the following division ... 3086/3600 ... to that field it displays as 0.0.

    Can anyone explain why?

    Does anyone know how to get around this and get 0.857 into that field instead.

    I have tried changing the data type to Decimal(20,2) but this has had no effect.

    Any suggestions would be very much appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •