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 |
|
shapper
Constraint Violating Yak Guru
450 Posts |
Posted - 2007-03-30 : 10:23:45
|
| Hello,I have an SQL 2005 table named posts. In this table I have a DateTime Column named PublishedDate.I need to display, on a web page, the following:1. All posts for a given month;2. A list of months and years with the number of posts per month: 2007 March(20) February(15) January(10) 2006 December(12) November(15) ...I suppose I need 2 SQL queries:1. Get posts for a given month. How can I do this? Is it possible to pass a month and year as a parameter?2. Get the number of posts organized by month and year. How to do this? I will display it on an Asp.Net TreeView.Thanks,Miguel |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|