In Clarity PPM, across workspaces, incorrect results are returned when applying filters using the Between operator on number-type attributes containing negative values. Records with negative numbers are not filtered as expected, resulting in inaccurate output.
Steps to Reproduce:
100, 200, -100, -200).-100 to -200.Actual Result:The filter returns zero results.
Expected Result:The filter should return records where the attribute values fall within the specified negative range (-100 to -200).
Clarity all supported version
The BETWEEN operator is part of the standard ANSI SQL specification, which means almost all relational databases handle it the exact same way. Because it evaluates this strictly from left to right, putting the larger number first (BETWEEN -100 AND -200) will always result in zero rows being returned, regardless of whether you are using PostgreSQL, Oracle, MS SQL.
When filtering a range in a database, the system always reads from the lowest mathematical value to the highest mathematical value (left to right on a number line). Because -200 is a lower number than -100, we must ask the database for values BETWEEN -200 AND -100 so it can correctly find everything in that window.
Documentation from database vendors on how to use between operator