Problem with query range reporting Incorrect syntax near OFFSET