i have a scenario that when any user first upload document then this go for approval first to supervisor then when supervisor approve/reject documents then only approve documents go to manager then again when manager approve/reject document then only approve document shows to director for final approval
ALTER PROCEDURE [dbo].[ALLDOCUMNETS] AS begin SELECT DocumentInfo.DocID as DocumentID, dbo.DocumentInfo.DocName as DocumentName, dbo.DocumentInfo.Uploadfile as FileUploaded, dbo.DocumentInfo.UploadedBy as UploadedBy, dbo.Userss.Email as UserEmail, dbo.DocType.DocType as Document, dbo.Department.DepType as Department , dbo.Approval.AppoveBy, dbo.ApproveType.ApproveType as Status 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 inner join dbo.Approval ON dbo.DocumentInfo.DocID = dbo.Approval.DocID INNER JOIN dbo.ApproveType ON dbo.Approval.ApproveID = dbo.ApproveType.ApproveID AND dbo.ApproveType.ApproveType = 'Approve' end
here above record kanez is manager and sundus is supervisor
here i want to show only kanez approve documents show to director then he will be able to final approval but here both supervisor and manager documents go to director but i want to show only kanez document approve documents to director??
table viewS
how i done this?