Hypermommy
Programmer
Hi all,
I'm sure hoping someone can help me with this becuase I'm pretty stumped. I'd like to write a SQL Server Stored Procedure that will return two recordsets.
1) A listing of all the top level folders -- i.e., those available to administrators when they select public folders -- and a count of all reports in those folders. Not the instances of the report but just the report itself (i.e., if someone's run Report1 6 times and has run Report2 12 times, the number associated with the top level folder that reports 1 and 2 are found in should only be 2, not 18).
2) A listing of each of the reports within each top level folder, regardless of how many sub folders stand between the report and the top level folder.
So.. if I can see this in ePortfolio:
Folder 1
Subfolder 1
Report1
Report2
Report3
Subfolder 2
Report4
Report5
Folder 2
Report6
Report7
Report8
Report9
Folder 3
Subfolder 3
Subfolder 5
Report10
Report11
Subfolder 4
Report12
I'd like Recordset #1 to have the following information
Folder1-Name 5
Folder2-Name 4
Folder3-Name 3
And I'd like Recordset #2 to have the following information
Folder1-Name Report1-Name
Folder1-Name Report2-Name
Folder1-Name Report3-Name
Folder1-Name Report4-Name
Folder1-Name Report5-Name
Folder2-Name Report6-Name
Folder2-Name Report7-Name
Folder2-Name Report8-Name
Folder2-Name Report9-Name
Folder3-Name Report10-Name
Folder3-Name Report11-Name
Folder3-Name Report12-Name
Thanks in advance for any assistance you can give me on figuring out the query/logic to put in the stored procedure.
-= Hypermommy =-
I'm sure hoping someone can help me with this becuase I'm pretty stumped. I'd like to write a SQL Server Stored Procedure that will return two recordsets.
1) A listing of all the top level folders -- i.e., those available to administrators when they select public folders -- and a count of all reports in those folders. Not the instances of the report but just the report itself (i.e., if someone's run Report1 6 times and has run Report2 12 times, the number associated with the top level folder that reports 1 and 2 are found in should only be 2, not 18).
2) A listing of each of the reports within each top level folder, regardless of how many sub folders stand between the report and the top level folder.
So.. if I can see this in ePortfolio:
Folder 1
Subfolder 1
Report1
Report2
Report3
Subfolder 2
Report4
Report5
Folder 2
Report6
Report7
Report8
Report9
Folder 3
Subfolder 3
Subfolder 5
Report10
Report11
Subfolder 4
Report12
I'd like Recordset #1 to have the following information
Folder1-Name 5
Folder2-Name 4
Folder3-Name 3
And I'd like Recordset #2 to have the following information
Folder1-Name Report1-Name
Folder1-Name Report2-Name
Folder1-Name Report3-Name
Folder1-Name Report4-Name
Folder1-Name Report5-Name
Folder2-Name Report6-Name
Folder2-Name Report7-Name
Folder2-Name Report8-Name
Folder2-Name Report9-Name
Folder3-Name Report10-Name
Folder3-Name Report11-Name
Folder3-Name Report12-Name
Thanks in advance for any assistance you can give me on figuring out the query/logic to put in the stored procedure.
-= Hypermommy =-