coolbeachguy
Programmer
Hi,
I executed this query:
SELECT * FROM Orders where LocationID = 21 ORDER BY OrderNumber DESC
It returns 22 records.
Then I executed this query:
SELECT * FROM Orders where LocationID = 21 AND OrderNumber = 8145 ORDER BY OrderNumber DESC
The second query returns record, but this record is not returned by the first query. And it should be.
Both queries are executed in Query Analyzer.
I tried to execute both queries from Enterprise Manager, and both return correct results. So only incorrect in the Query Analyzer.
Any input is appreciated.
Thanks,
coolbeachguy
I executed this query:
SELECT * FROM Orders where LocationID = 21 ORDER BY OrderNumber DESC
It returns 22 records.
Then I executed this query:
SELECT * FROM Orders where LocationID = 21 AND OrderNumber = 8145 ORDER BY OrderNumber DESC
The second query returns record, but this record is not returned by the first query. And it should be.
Both queries are executed in Query Analyzer.
I tried to execute both queries from Enterprise Manager, and both return correct results. So only incorrect in the Query Analyzer.
Any input is appreciated.
Thanks,
coolbeachguy