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 |
|
somu_p
Starting Member
13 Posts |
Posted - 2007-07-11 : 01:49:30
|
| Hi, I've two tables names mRoles & mSubroles. Here i'm giving the structure and sample datas.mRoles======roleId name1 User Groups2 User Types3 UsersmSubroles=========subRoleId roleId name1 1 Add2 1 Edit3 1 View4 1 DeleteI want to display like this.roleId name Add Edit View Delete1 User Groups 1 2 3 42 User Types 1 2 3 43 Users 1 2 3 4Kindly help me in this regard.Thanks & Regards,P.Somasundaram |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-07-11 : 01:54:57
|
use the PIVOT operator. Refer to BOL on the syntax and example KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|