i'm having a problem with my sql below
the discounttype.percentage is supplse to be 25 and the totalsales.subtotal is suppose to be 250
so that sum that i should get is (25/100)*250 which is 62.5
but the figure i get is 0
why is that so?
discounttype.percentage is INT
totalsales.subtotal is MONEY
why i keep getting 0??? anyway to count this?
VB.NET:
SELECT
sum((discounttype.percentage/100)*totalsales.subtotal)
FROM
totalsales
INNER JOIN
discounttype
ON
totalsales.discounttype = discounttype.discounttypeid
WHERE
totalsales.invno = 62
the discounttype.percentage is supplse to be 25 and the totalsales.subtotal is suppose to be 250
so that sum that i should get is (25/100)*250 which is 62.5
but the figure i get is 0
why is that so?
discounttype.percentage is INT
totalsales.subtotal is MONEY
why i keep getting 0??? anyway to count this?