我有一个像
这样的部门的表departmentid department type
1 computer science
2 hr
3 finance
这是查看文档的商店程序
ALTER PROCEDURE [dbo].[statuschange]
AS
SELECT di.DocID,
di.DocName,
di.Uploadfile,
dt.DocType,
d.DepType,
at.ApproveType
FROM DocumentInfo di
JOIN
DocType dt ON dt.DocTypeID = di.DocTypeID
JOIN
Department d ON d.DepID = di.DepID
LEFT OUTER JOIN
Approval a ON a.DocID = di.DocID
JOIN
ApproveType at ON at.ApproveID = ISNULL(a.Approveid, 3)
现在我想显示具有特定部门ID的文件
计算机科学管理员只能查看计算机科学文档,而hr管理员只能查看hr文档
任何解决方案?