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 |
|
abarsami
Yak Posting Veteran
68 Posts |
Posted - 2001-02-03 : 02:58:18
|
| I am trying to use datepart to accomplish some tasks.I wrote a query that counts the number of messages in a message table. Now I want to take that result and display it based on some situations.1) Weekly - if this is picked, it displays the number of messages on monday, tuesday, ... through Sunday2) Monthly - displays # of messages on week1, week2, week33) Yearly - displays # of messages in Jan, Feb... and so on.Is there a value in sql that knows what Monday is... For example does Monday = 1. Can I count the # of Mondays that a message has been written, if I know the date.I know the top 3 choices will be in the where clause, but I would appreciate some help.Thanks |
|
|
|
|
|