February 16, 2006 at 4:13 am
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
February 16, 2006 at 4:43 am
modify command like this
SET FldA = cast(FldB as float)/cast(FldC as float)
February 16, 2006 at 6:43 am
pls. use the given Expression in place of that:
set =Convert(Numeric(18,5),FldB)/Convert(Numeric(18,5),Fldc)
February 16, 2006 at 7:10 am
Thanks
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply