how do I show all files uploaded to the server by a user?

  • Hi experts,

    In our new app, a user is given the option of uploading one or files to the server and saving the filename and path to the database.

    We would like to display all files associated with a particular user.

    Obviously, the code below is only displaying one file.

    Any ideas how to display all files associated with a particular employee?

    select ROW_NUMBER()OVER (ORDER BY empID) as empnum , fName, filePath from Employee where EmpID='KF14170';

    I might add the format of the file is empID plus the filename:

    Example: KF14170Evidence1, KF14170Evidence2.

    Thanks in advance

  • Without knowing the structure of your database, it's kinda impossible to answer.

    What is stored in the fName and filePath columns of the Employee table? Just the most recent upload?

    Is there a table which stores the historical uploads? If so, what is it called and what is its structure?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply