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 |
|
whatamouth
Starting Member
16 Posts |
Posted - 2012-02-16 : 15:12:33
|
Heres my reference tableTable_A FK_____Column_A_____Column_B_____Column_C_____001_____ok_____ok_____ok_____002_____AA_____ok_____AA_____003_____AA_____ok_____ok_____004_____ok_____ok_____ok_____005_____ok_____ok_____ok_____001_____AA_____ok_____ok_____002_____AA_____ok_____AA_____003_____AA_____ok_____AA_____004_____ok_____ok_____ok_____005_____ok_____ok_____ok_____ Desired output = get the total count of 'AA' per column per FKSo the output would be like this.FK_____Column_A_____Column_B_____Column_C_____001_____1_____0_____0_____002_____2_____0_____2_____003_____2_____0_____1_____004_____0_____0_____0_____005_____0_____0_____0_____I can do this for 2 columns, dunno how for 3 or more any help would be appreciated. ThanksNeil Matiasneilmatias@yahoo.com |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
whatamouth
Starting Member
16 Posts |
Posted - 2012-02-16 : 15:53:05
|
Perfect Thanks 8rett!Neil Matiasneilmatias@yahoo.com |
 |
|
|
|
|
|