Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to show
when supervisor approve document
like hr supervisor approve hr documents then hr manager able to view that
who approve document i.e approve by

here is sp
when i enter this
sphrdoc2 1
it shows me
SQL
Docid	docname	document approvetype department	fileuploaded approveid
20 	hosting	msword	3	finace	abc.docx	pending
21	attock	msword	1	finance	def.docx	approve


http://i40.tinypic.com/xdjjk.png[^]

when finance supervisoir approve finance documnet then when finance manager login to their account then finance manager able view like this
SQL
Docid	docname	document approvetype department	fileuploaded approveid approveby
20 	hosting	msword	3	 finace	        abc.docx       pending	
21	attock	msword	1	finance	       def.docx	     approve   	      supervisor


i try to add last column but i can't do it :(
Posted
Updated 6-Nov-13 22:10pm
v4
Comments
CodeBlack 7-Nov-13 4:11am    
how you tried to add last column ?
Diya Ayesa 7-Nov-13 4:11am    
please see the link
Diya Ayesa 7-Nov-13 4:14am    
alter procedure spmanager

@UserID int
as
Select
dbo.DocumentInfo.DocID as DocumentID,
dbo.DocumentInfo.DocName as DocumentName,

dbo.DocType.DocType as Document,
dbo.DocumentInfo.ApproveID as ApproveType,
dbo.Department.DepType as Department,
dbo.DocumentInfo.Uploadfile as FileUploaded,
dbo.ApproveType.ApproveType AS ApproveID ,
dbo.Approval.AppoveBy as ApproveBy,
dbo.DocumentInfo.UserID as Usersid


FROM
dbo.DocumentInfo
inner JOIN dbo.DocType ON dbo.DocumentInfo.DocTypeID=dbo.DocType.DocTypeID
inner JOIN dbo.Department ON dbo.DocumentInfo.DepID=dbo.Department.DepID
left join dbo.ApproveType on dbo.DocumentInfo.ApproveID=dbo.ApproveType.ApproveID
left join dbo.Approval on dbo.Approval.AppoveBy =dbo.DocumentInfo.UserID
where UserID=@UserID

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900