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 |
john_john
Starting Member
10 Posts |
Posted - 2005-06-02 : 16:34:48
|
This is really urgent. I'd greatly appreciate it if someone can help me out. :)I have the following table.Table name: SampleDate Mode 05/31/2005 A05/31/2005 B 05/31/2005 A05/31/2005 A05/30/2005 B05/30/2005 B05/30/2005 BI need to build a query that accepts date as a parameter and returns the count of each type of mode for the corresponding date as well as the total count of the number of modes on that date.So for example, the output of the query could be something like this.Date Count-A Count-B Total_Count05/31/2005 3 1 405/30/2005 0 3 3 |
|
AndyB13
Aged Yak Warrior
583 Posts |
Posted - 2005-06-02 : 17:08:13
|
Please dont cross post [url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=50613[/url]Only joking Couldnt you use a crosstab query then? This would give you what you wantAndyBeauty is in the eyes of the beerholder |
 |
|
john_john
Starting Member
10 Posts |
Posted - 2005-06-02 : 18:32:41
|
Thanks Andy, I was able to figure it out. |
 |
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|