Limiting the range of values in a cursor