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 |
|
Datapimp23
Starting Member
2 Posts |
Posted - 2009-10-30 : 08:40:28
|
| hey guys,Imagine this.Table: key reservationcolumns:ReservationID <- primary keykeyIDEmployeeIDnow I want to count how much times a certain key is in this table without using the where for every keyID.Is this possible? |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-10-30 : 08:44:57
|
| You mean this?select count(keyid),keyid from table group by keyidSenthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-10-30 : 08:46:39
|
| select count(keyid),EmployeeID from table group by EmployeeIDMadhivananFailing to plan is Planning to fail |
 |
|
|
Datapimp23
Starting Member
2 Posts |
Posted - 2009-10-30 : 09:01:14
|
| that was it,thanks madhivanan |
 |
|
|
|
|
|