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 |
|
gotafly
Yak Posting Veteran
54 Posts |
Posted - 2007-05-30 : 19:55:26
|
| I have 2 tables:Group and MemberGroup has the following fields:groupID, groupDesc and accountNoMember has:memberID,htmlYes, accountNoI need to fill a datagrid with all the groups in specific accounts. So lets say I have account 8. I need the counts of all the members that are members with htmlYes of 1 and then members with htmlYes of 0IN the same record:so:GROUP NAME HTML TEXTgroup 1 8 6group 2 200 60group 3 100 50 |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-05-30 : 19:58:24
|
| Can you post some sample data from each table for which you are expecting the output you posted?Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
gotafly
Yak Posting Veteran
54 Posts |
Posted - 2007-05-30 : 20:05:13
|
| SELECT groupID, groupDesc, accountNoFROM groupWHERE (accountNo = 3)ORDER BY groupID6 groupaaa 37 4444 3SELECT memberID, htmlYes, accountNoFROM demomemberWHERE (accountNo = 3)2 no 33 no 36 no 3 |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-05-30 : 21:49:50
|
can you post1. your table structure2. some sample data from each of the table3. expected result KH |
 |
|
|
|
|
|