Rounding numbers

Dharmesh

Registered User.
Local time
Today, 08:32
Joined
Dec 7, 2006
Messages
25
Hi

Does anyone know how to round a number in the query designer.

Thanks

Dharmesh

This is what i have typed into my field in the query designer. what am i doing wrong.

Base price: Round([base price],1)
 
i think you can't use embedded access functions in the query designer. i think its because they are not native sql functions.

you have to get around it by in your case,

clng(number * 10)/10

ie multiply the number by 10, then convert it to a long. now divide it by 10 and you will get a number with 1dp in principle.

however, i am not sure if you CAN actually represent 0.1 (say) with a binary expansion, so you may ACTUALLY still be storing a VERY VERY slightly different number, which may or may not be an issue for you.
 

Users who are viewing this thread

Back
Top Bottom