Ceiling and floor alternative

  • Thread starter Thread starter Jens Burup
  • Start date Start date
J

Jens Burup

Hi NG

I tryied to use Ceiling and Floor in ACCESS SQL , but it seem these
functions dosent work in ACCESS SQL
Any alternative?

Regards
Jens
 
Jens said:
I tryied to use Ceiling and Floor in ACCESS SQL , but it seem these
functions dosent work in ACCESS SQL


Depending on how you want to handle negative values, you can
use the Int or Fix functions for Floor.

An expression that is equivalent to Ceiling is:
IIf(var = Int(var), var, Int(var + 1))
or variations for negatinve values.
 
Marshall Barton said:
Depending on how you want to handle negative values, you can
use the Int or Fix functions for Floor.

An expression that is equivalent to Ceiling is:
IIf(var = Int(var), var, Int(var + 1))
or variations for negatinve values.

I needed for a specific project the ceiling function to find the positive
value to the nearest 100, but digging a little bit more in this useful
group, I found the answer(YourNumber\100-(YourNumber MOD 100 <>0))*100
But i was also useful to know that such a statement does not exist in ACCESS
thx
Jens
 
Back
Top