Partition function in Access
Once I found that Access has Partition function, which I never used. Function returns a Variant (String) indicating where a number occurs within a calculated series of ranges. You can use is to find lower and upper edge of partition where number falls. Few samples:
?Partition(33,1,100,5)
31: 35
?Partition(7,1,100,5)
6: 10
?Partition(999,1,100,5)
101:
Now I am thinking – how can I use it? Looks like I never missed such function. Do you have real-life example using Partition function?
Labels: Access
2 Comments:
Here's one possible use: Access Blog - Create partition queries
I used partition() to ascertain how many people fell within certain age ranges within a system. The results were something like:
Age range - count
0:20 - 25
21:64 - 32
65: - 46
I proved to be a very useful function at the time - as a result I kept looking for ways to use it in a few subsequent systems.
Paul Harrold Access developer
Post a Comment
<< Home