Dividing int columns

  • Hi,

    I need to set a fields value (a money datatype field) to the division result of another two fields.

    So,

    SET FldA = FldB/FldC

    FldB & FldC are both Int fields, where as FldA is a Money field.

    I keep getting 0 as the result, when i want it to show me 0.0whatever.

    Do i need to use cast on both FldB & C in the division, or can i do this in a simpler way?

    Thanks

    Matt

  • modify command like this

    SET FldA = cast(FldB as float)/cast(FldC as float)

  •  

    pls. use the given Expression in place of that:

     

    set =Convert(Numeric(18,5),FldB)/Convert(Numeric(18,5),Fldc)

  • Thanks

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply