Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Documents view permission

$
0
0

there is a designation table and there is admins e.g supervisor,manager ,director

so when supervisor upload document then he/she not able t see his/her documents

i try this sp

SELECT dbo.DocumentInfo.DocID, dbo.DocumentInfo.DocName as DocumentName,
 dbo.DocumentInfo.Uploadfile,
 dbo.DocumentInfo.UploadedBy as UploadedBy,
 dbo.Userss.Email as UserEmail,
  dbo.Department.DepType ,
  dbo.ApproveType.ApproveType AS ApproveID
  FROM dbo.Department
  left JOIN dbo.DocumentInfo
  ON dbo.DocumentInfo.DepID=dbo.Department.DepID


  left JOIN dbo.DocType
  ON  dbo.DocumentInfo.DocTypeID=dbo.DocType.DocTypeID
    inner JOIN dbo.Userss on Userss.UserName =dbo.DocumentInfo.UploadedBy
     
 
   LEFT JOIN dbo.ApproveType
    ON dbo.ApproveType.approveid=dbo.Department.DepID
    where dbo.Department.DepID=@DepID

s0 how i appy condition that supervisor not able to see his/her documents?



Viewing all articles
Browse latest Browse all 23857

Trending Articles