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 |
|
andrewcw
Posting Yak Master
133 Posts |
Posted - 2005-05-15 : 00:20:45
|
| can this be done, but I keep getting syntax errors.I need to count the # of rows returned from this:SELECT DISTINCT CustomerFROM dbo.TestBlockStatusWHERE (ModelEnum = 0) AND (SystemName = '2731')But this does not work, why ?? & how to fix it ( Thanks ! )SELECT COUNT(*) AS inTotalFROM dbo.TestBlockStatus (WHERE SELECT DISTINCT CustomerFROM dbo.TestBlockStatusWHERE (ModelEnum = 0) AND (SystemName = '2731')) as Aandrewcw |
|
|
LarsG
Constraint Violating Yak Guru
284 Posts |
Posted - 2005-05-15 : 06:33:21
|
| [code]SELECT count(DISTINCT Customer) as inTotalFROM dbo.TestBlockStatusWHERE (ModelEnum = 0) AND (SystemName = '2731')[/code] |
 |
|
|
andrewcw
Posting Yak Master
133 Posts |
Posted - 2005-05-15 : 12:39:23
|
| Thanks very MUCH ! It works !andrewcw |
 |
|
|
|
|
|