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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 get data from many tables

Author  Topic 

pamyral_279
Posting Yak Master

143 Posts

Posted - 2009-06-02 : 08:14:05
Hi everyone,
I need your help. I have structure sql server 2005 as my link :
http://www.khahomex.com.vn/vn/images/banner789.jpg

User >> Group >> Categories >> Function
User may be in many groups.Group can store many categories.Categories include many functions.

Now i want to get data as two form :

Form1 :
User Group Categories Function
MrA --- A ---- A1 ---- F1
MrA --- B ---- A2 ---- F2
MrB --- C ---- A1 ---- F1
.....

Form2:
User Group Categories Function
MrA--- A+B --- A1+A2 --- F1+F2
MrB--- C ---- A1 --- F1
.....

Please help !
Thank you very much.

pamyral_279
Posting Yak Master

143 Posts

Posted - 2009-06-02 : 11:23:33
Any one help me ???
User table include : MrA,MrB ...
Group table include : A,B,C ..
Categories table include : A1,A2 ...
Function table include : F1,F2 ..
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-02 : 11:56:52
see this

http://www.simple-talk.com/sql/t-sql-programming/concatenating-row-values-in-transact-sql/
Go to Top of Page
   

- Advertisement -