alu(提问者)非常感谢各位!以下语句实现了报表与角色的对应,分享一下:
select x.*,y.* from
(
SELECT
f.id as 目录id,f.name as 目录,r.id,r.parent,r.name as 报表
FROM PUBLIC.FR_REPORTLETENTRY r,PUBLIC.FR_FOLDERENTRY f
where r.parent = f.id
and r.parent>50
) x
left join
(
SELECT a.entryid,c.rolename as 角色 FROM FR_T_CUSTOMROLEENTRYPRIVILEGE a
LEFT JOIN FR_T_CUSTOMROLE c ON a.ROLEID=c.id
) y
on x.id=y.entryid
where 1=1
order by 目录,报表