Hi. I am using SQL 2005.
Table one, LinkedDocumentFolderTable, contains the names and information about the folders that hold linked documents.
Table two, LinkedDocumentTable, contains the information about the linked documents themselves.
The two tables are linked by the LinkedDocumentFolderID.
I need the LinkedDocumentFolderID, Description, FolderURL and IsUnmanagedFolder from the LinkedDocumentFolderTable. I would also like to get a count of the number of linked documents in each folder (identified by the linkeddocumentfolderid).
The statement below works from the perspective of giving me an overall count of documents in the LinkedDocumentTable, but doesn't break it out by linkeddocumentfolderid. Please help me re-write the statement to get a count of the linkeddocuments in each folder. Thanks in advance.
select Count(*)
from linkeddocumenttable
select ld.linkeddocumentfolderid,ld.description,
ld.folderURL,ld.isunmanagedfolder
from linkeddocumentfoldertable ld
inner join linkeddocumenttable l on
ld.linkeddocumentfolderid=l.linkeddocumentfolderid