Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ssalim
Starting Member
2 Posts |
Posted - 2009-02-02 : 14:10:28
|
Hi,I have this table that giving different results on 2 queries.Let's say the table has these columns:name // zipthis query:select * from tablename where name = 'AAA'gives this result:1 // AAA // 920002 // AAA // 920013 // AAA // 92002however, this query:select * from tablename where name = 'AAA' and zip = 92003should returns 0 right?not this time. It gives:1 // AAA // 92003... so what gives?Thanks!Edit: I'm on Microsoft SQL Server 2000 |
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-02-02 : 15:51:29
|
where are you running this query ? Any chance that it returns top 3 records or so ? |
|
|
ssalim
Starting Member
2 Posts |
Posted - 2009-02-02 : 16:03:33
|
I'm running on SQL Server management studio. No, no top 3 or set rowcount statements.Thanks for reply. |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-02 : 18:54:21
|
You need to check records properly. |
|
|
tosscrosby
Aged Yak Warrior
676 Posts |
Posted - 2009-02-03 : 09:36:11
|
quote: Originally posted by sodeep You need to check records properly.
I agree. It's not corruption. What does select * from tablename where zip = 92003 yield? It appears you don't know what the data set is....but it's definitely not SQL-related.Terry-- Procrastinate now! |
|
|
|
|
|