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 |
|
label
Posting Yak Master
197 Posts |
Posted - 2003-02-17 : 10:37:11
|
| I'm coming up with some odd results.When I run this query:select count(modelname) as cnt, modelnamefrom smc_new_products.dbo.etechmodelrequestswhere interfacename like '%download%'and requestdatetime between '01/01/2001' and '02/16/03'group by modelnameorder by cnt descI return a record count of "69301" of rows that are empty/have no value. (Not Null) When I run this query however: select count(modelname) from etechmodelrequestswhere modelname=' 'and requestdatetime between '01/01/2001' and '02/16/03'I get a result of "73421"I don't understand why the results would be different nor do I have any idea which number is correct?Thanks |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2003-02-17 : 10:44:49
|
| You don't have matching WHERE conditions in the two queries.- Jeff |
 |
|
|
label
Posting Yak Master
197 Posts |
Posted - 2003-02-17 : 11:16:01
|
quote: You don't have matching WHERE conditions in the two queries.
Sheesh. I knew I was missing something obvious. That's what I get for staying up to late watching my Babylon 5 dvds. Thanks. :) |
 |
|
|
|
|
|