我有两张这样的桌子:
PermissionsTbl
__________________
PermissionID int NotNull
PermissionDescription nvarchar(100) NotNull
PermissionID PermissionDescription
1 Human Resources
2 Employees Data
3 Departements
ActivePermissionsTbl
________________________
ActivePermID bigint NotNull
PermissionID int NotNull
UserID int NotNull
PageActive bit NotNull
ActivePermID PermissionID UserID PageActive
1 1 1 True
2 2 1 True
3 3 2 True
我想要的是显示这样的数据:
PermissionID PermissionDescription PageActive UserID
1 Human Resources True 1
2 Employees Data True 1
3 Departements 1
1 Human Resources 2
2 Employees Data 2
3 Departements True 2
我尝试了几种 Join 方法,但我失败了<请提出任何建议。谢谢。