>The other possibility of having @tax float. Since float is not a precise number, that may explain the problem.
>If you exclude @tax condition will you always get the same rows?
>
>BTW, is Tax column float in the database? If yes, it's a bad decision.
This select was rename at various level to hide private information. Tax is just a placeholder and represents a boolean field in the real table.
This is related to the date precision that differs from the application and SSMS.