I have this table structure on a SQL Server 2008 R2 database:
CREATE TABLE FormTest
(
clientid char(10),
DateSelected date,
A int,
B int,
C int
)
You're performing integer arithmetic, so your results will always be rounded down to the nearest whole number. Since you're dividing by 3, then by 216647, based on the numeric inputs your result is getting rounded down to 0 every time. You'll need to use either a decimal (exact) or floating point (approximate) data type and/or casting if you want to get non-integer results.