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 |
nicci113
Starting Member
11 Posts |
Posted - 2012-10-24 : 05:55:31
|
SELECT cvw_FlatView_Cases.NoticeNumber, cvw_FlatView_Cases.IssueMonthYearFROM SiDem_Reports.dbo.cvw_FlatView_Cases cvw_FlatView_CasesWHERE (cvw_FlatView_Cases.IssueDate>={ts '2012-04-01 00:00:00'} And cvw_FlatView_Cases.IssueDate<=getdate())GROUP BY cvw_FlatView_Cases.NoticeNumber, cvw_FlatView_Cases.IssueMonthYearResult:HQ03037830 May-2012HQ03201140 May-2012HQ03147282 May-2012HQ03039654 May-2012HQ03201151 May-2012Hey Can you please guide, the above is my SQL and below is the result I am getting. I only want to count the number of HQ% that comes in a month and dont want to see the actual number any help? |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2012-10-24 : 05:59:31
|
maybeSELECT count(*), cvw_FlatView_Cases.IssueMonthYearFROM SiDem_Reports.dbo.cvw_FlatView_Cases cvw_FlatView_CasesWHERE (cvw_FlatView_Cases.IssueDate>={ts '2012-04-01 00:00:00'} And cvw_FlatView_Cases.IssueDate<=getdate())GROUP BY cvw_FlatView_Cases.IssueMonthYear==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
nicci113
Starting Member
11 Posts |
Posted - 2012-10-24 : 06:06:52
|
it does make me numpty in here, tried this but didnt worked..hate writing sql in excel. Thanks mate much appreciate |
|
|
|
|
|