tags:

views:

13

answers:

0

Hi all,

The title kinda says it all. I need to generate a report that is roughly 100 columns wide(tools) and many thousands of rows deep (users) having a '1' displayed at each intersection where a user is related to a tool.

         Tool1   Tool2   Tool3   Tool4   ...Tooln

user1               1               1
user2                                1                              1
user4               1              

If a user is not related to any tool, the user row should not be included in the report.

There are three tables involved: Users, Tools and User_Tool. User_Tool is the intermediate table forming the many-to-many relationship between users and tools.

Users:
UserID,
username,
etc

Tools:
ToolID,
toolname,
etc

User_Tool:
ID,
UserID,
ToolID

Thanks in advance for any assistance.