--客户表名"new_customer"
 SELECT u.FullName AS 被共享人,a.new_name AS 客户名称,sup.SystemUserid AS 共享人ID,POA.ObjectId AS 共享记录ID FROM PrincipalObjectAccess  POA inner
 join SystemUserPrincipals sup on POA.PrincipalId = sup.PrincipalId  inner join SystemUserBase u
 on sup.SystemUserId=u.SystemUserId inner join dbo.new_customer a
 on a.new_customerId=POA.ObjectId WHERE POA.ObjectId IN (SELECT new_customerId FROM dbo.new_customer)

05-06 06:46