Link to home
Start Free TrialLog in
Avatar of Jim Metcalf
Jim MetcalfFlag for United States of America

asked on

identify data values with 3 numbers after decimal point instead of the desired 2

help identifying values in a table.

i have a table with a column called transaction amt.     this column is (money, int) datatype

unfortunately, there are some money transactions have partial pennies showing up.   ie... transaction amount might be   59.787.    we only need 2 decimal places

does anyone know how to find all transactions where there are 3 digits after the decimal point instead of the desired 2.
ASKER CERTIFIED SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jim Metcalf

ASKER

have no idea why that worked... but it did
Thanks Scott!
Why it works:

% is remainder after division (modulus).  The modulus result must be smaller than the divisor, in this case 0.01.  So it shows you any values below .01 that are not 0, i.e., thousandths.

For example:
31 % 4 = 3, because that's the remainder after dividing 31 by 4.