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 |
zeeshan13
Constraint Violating Yak Guru
347 Posts |
Posted - 2006-12-11 : 15:44:06
|
Hi All,I am pretty new in to SQL.I have a table Table1 with following 2 fields.[sales unit](nvarchar type),and IfBB (nvarchar type) The Table1 has follwing records. (Fileds/records are sperated by comma ')[sales unit], IfBB Not assigned, BBNumber of items, BBNumber of items, BBNot assigned, NONot assigned, NOI want to get a count on a combination of the above 2 columns. That is in the above example I should see the following.[sales unit], IfBB, CountNot assigned, BB, 1Number of items, BB, 2Not assigned, NO, 2Any idea?Thanks,Zeeshan |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-12-11 : 15:50:17
|
SELECT [sales unit], IfBB, COUNT(*)FROM Table1GROUP BY [sales unit], IfBBTara Kizer |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|
|