Updating field for numeric bins

  • Thread starter Thread starter Jessica
  • Start date Start date
J

Jessica

Hello!

I have a table of measurements and I want to add to it a
field that will determine what bin range it will fall
into. I have created a bin range table with BinMin,
BinMax and BinName. BinMin is the lowest number in the
range and BinMax the highest, and BinName is what I want
entered into my measurements table. I've been trying to
do this and keep getting nowhere. I've currently gotten
around the problem by listing in another table every
measurement and its corresponding BinName, but as my bins
change frequently I do not want to do this often. Think
of this as similar to using the histogram function in
Excel. So for example I have measurements of:
75
71
86
91
108

and I want them in 5 increment bins (70, 75, 80...); then
later I might want to update it to 1 increment bins (71,
72, 73...). How would I get this to update? I tried IIf
statements and other dmax statements, but nothing seems to
work. Any thoughts out there on how to do this?

Thanks!

Jessica
 
The Table layout isn't clear but if each record is a
measurement and a bin#. I'm also assuming that the bin# is
a function of the measurement like +2 or \10. Then use an
update query like this
UPDATE
SET
.[bin#] = [measurement]\10;
this would put your bin# by 10.

Martin
 
Back
Top