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 |
|
Leo_Don
Starting Member
42 Posts |
Posted - 2011-02-02 : 06:08:35
|
| Hi experts,need a helphave a table with id | action| date|-------------------1| call| 02-01-111| call| 03-01-111| mail| 02-01-112| call| 03-01-112| mail| 02-01-11i am trying to generate a report where in i can count the action for the user on datebelow is the query what i am tryingselect id, action, action, count(action) as sum, datefrom table group by action, useridbut i need to group by date as well which i dont want to as i can select the date in the report...any help thanks in advance |
|
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2011-02-02 : 06:28:01
|
| post the required output format for the given data ..so that we can map your requirements on the given input :D |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-02-02 : 08:55:29
|
| Pass a value to datetime parameterselect id, action, action, count(action) as sumfrom table group by action, useridWHERE datecol=@date_valueMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|