a4apple (5/2/2014)
Are you using this query inside a stored procedure? If so there might be an issue of Parameter Sniffing.. Check in relation with that..
Parameter sniffing won't cause the results returned to be incorrect it can cause a sub-optimal plan to be used skewing performance. If parameter sniffing causes incorrect results that's a bug and a very big one that I think would have been caught and fixed a long time ago.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question