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 |
|
dhinasql
Posting Yak Master
195 Posts |
Posted - 2012-09-03 : 06:56:11
|
| Friends,I have 3 tables and using below Query i am Getting outout for "Actions" and "SubActions" of Users. But i want to change the display order.Example : I am using the below QuerySELECT UA.ActionID,SA.SubActionID , A.Actions , SA.SubActionsFROM UserAssociation UAJOIN Actions A ON A.ActionID = UA.ActionIDJOIN SubAction SA ON SA.ActionID = UA.ActionIDWHERE UA.UserID = 2Result :1 1 Action 1 Sub Action 1 of Action 11 3 Action 1 Sub Action 2 of Action 12 5 Action 2 Sub Action 1 of Action 2In my above query there is a possibility for repeated action for the sub Action, But Sub Action will be always unique string.My Expected Result :Activity SubActionId ------------------------- ------------ Action 1 0Sub Action 1 of Action 1 1 Sub Action 2 of Action 1 3 Action 2 0Sub Action 1 of Action 2 5"Action" Need to be categorised and have to assign the SubActionID as "0" Let me know if you need more details.Thanks. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-09-03 : 14:59:12
|
| this is more of a presentation issue and can be easily generated by using nested containers and applying grouping over action field in reporting tools like SSRS------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|