I am trying to select MTR values that are between the values of 0 and 4. What am I doing wrong?
SELECT DATEDIFF(M, TheDate, TheOtherDate) AS MTR FROM MyTable WHERE MyID = 2074163 AND MTR >= 0 OR MTR <= 4
Returns results that contain values inside and outside of the bounds of MTR being between 1 and 4. (from -3 to 75)
SELECT DATEDIFF(M, TheDate, TheOtherDate) AS MTR FROM MyTable WHERE MyID = 2074163 and MTR BETWEEN 0 AND 4
Is also returning results that are 0, -2, -3, and -4 - but nothing higher than 0 and less than 4 (except for the entries that are 0)