i haave two tables users and document
i run query this
ALTER procedure [dbo].[sp_get_doc_username]
@userid int
as
SELECT dbo.[Document].DocID, dbo.Users.UserName AS Uploadedby, dbo.[Document].DocName, dbo.[Document].Uploadfile, dbo.DocType.DocType,
dbo.Department.DepType
FROM dbo.Department INNER JOIN
dbo.[Document] ON dbo.Department.DepID = dbo.[Document].DepID INNER JOIN
dbo.DocType ON dbo.[Document].DocTypeID = dbo.DocType.DocTypeID INNER JOIN
dbo.Users ON dbo.Department.DepID = dbo.Users.DepID AND dbo.[Document].DocID = dbo.Users.DocID
where Users.USERID=@userid
when user is log in then go to upload documents then when he/she uplaod document and save into database then when he/she
click in view then also show username beacuse i want to show whcih user upload document

