SELECT
  CD.DocID,
  CD.TypeID,
  CD.FileName,
  CD.Folder,
  CD.Description,
  CD.UploadDate,
  CD.UploadedBy,
  U1.FullName AS Consultant,
  1 AS FileExists,
  '' AS FileSizeLabel,
  0 AS FileSize
FROM
  taDocument AS CD
    LEFT JOIN taUsers AS U1 ON (U1.UserID = CD.UploadedBy)
WHERE
  (CD.DocType = @aDocType) AND
  (CD.TypeID = @nTypeID)
  @pFolder