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 |
|
tariq2
Posting Yak Master
125 Posts |
Posted - 2010-08-26 : 09:04:32
|
| Objective:Counting the number of records in the Audit_JobNC with a periodkey of 61I am using the following:select count(CASE when PeriodKey = '61') from Audit_JobNCBut receive this:Incorrect syntax near ')'.Thank you for your helpT |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2010-08-26 : 09:10:48
|
select count(*) from Audit_JobNC WHERE PeriodKey = '61' N 56°04'39.26"E 12°55'05.63" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2010-08-26 : 09:11:22
|
select SUM(CASE WHEN PeriodKey = '61' THEN 1 ELSE 0 END) from Audit_JobNC N 56°04'39.26"E 12°55'05.63" |
 |
|
|
tariq2
Posting Yak Master
125 Posts |
Posted - 2010-08-26 : 09:54:27
|
| thank you, very helpful |
 |
|
|
|
|
|