Subject Re: {Disarmed} Re: {Disarmed} Re: [firebird-support] How do I determine a percentage of a dollar amount?
Author SoftTech
Thanks Alan, you are correct

----- Original Message -----
From: Alan J Davies
To: firebird-support@yahoogroups.com
Sent: Monday, July 11, 2011 12:34 PM
Subject: {Disarmed} Re: {Disarmed} Re: [firebird-support] How do I determine a percentage of a dollar amount?




select 150.00 *(60/100)
from rdb$database

result = 0.00

select 150.00 *(60.00/100)
from rdb$database

result = 90.00

That should explain your problem - an integer value of 60 divided by 100
gives a (correct) integer value of 0.

Solution is simple - use a decimal value for :V_SETTLEMENT_PERCENTAGE in
your SP

Alan J Davies
Aldis

On 11/07/2011 18:04, SoftTech wrote:
> WRITE_OFF_AMOUNT = ITEM_BAL_DUE * (:V_SETTLEMENT_PERCENTAGE / 100)



--
MailScanner Virus/Spam/Malware: PASS (GZ)

[Non-text portions of this message have been removed]