Subject | Re: Computer By ? |
---|---|
Author | sesummers |
Post date | 2003-04-24T18:19:47Z |
--- In Firebird-general@yahoogroups.com, "buitrgon@h..."
<buitragon@h...> wrote:
the first has a "*"), try
((MERMA * PRICE)/100.0) + PRICE.
Mathmatically it's the same thing, but multiplying by Price will
promote the result to "Float".
<buitragon@h...> wrote:
> Hi:not accept
>
> Í´v two fields:
> Price and Merma,
> Price is Float and Merma is an SmallInt.
>
> I need to write a new field like this:
>
> New_Field = (Merma/100) * Price) + Price.
>
> I´d write a Computer By Field like below:
>
> ((MERMA/100) + PRICE) + PRICE.
>
> It round the value to the same value of Price because (MERMA/100)
> decimals.Assuming your first example was right (the 2nd one has a "+" where
>
> What can I Do?
the first has a "*"), try
((MERMA * PRICE)/100.0) + PRICE.
Mathmatically it's the same thing, but multiplying by Price will
promote the result to "Float".