I have had an odd error I cannot explain. Basically, I am running a query to my SQL database using excel and am having non-existent data pop up when it comes to a very particular order in my database.
Here is a simple query surrounding this order:
select * from OR200100 where OR200100.OR20001='0000793605'
Here is the output in EXCEL

And here is the same output in SQL

what is happening here? How could the same query generate 2 different results?
SET ROWCOUNT 1in your SSMS window before running the query?select COUNT(*) from OR200100 where OR200100.OR20001='0000793605'SET ROWCOUNT 1previously and forgot to reset it, or set it in the Query Options in SSMS. It would explain why SQL Server only returns one row instead of two. But please execute theCOUNT(*)query suggested by @RBarryYoung.