Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Variation of a Document Hit report for Folder contents
Rich_Morgan
Hey Comrades.. Okay.. I'm so close I can taste it on this one. I've got a need for a report that will allow me to pick a folder, and enter a number of days of history. In the example below I've hardcoded the docid and the number of days of history I want. What I want displayed is the...document name | Number of Views | Date of last hitI've got most of the report but I'm running into 2 problems.. 1st - The hits being returned are for every hit in the audit log, not just the hits within the number of days of history I'm specifying.2nd - The (MS) SQL below runs fine in directly in the analyzer, but in LiveReport form, it doens't like the "<" in my less-than portion of the date statement. Can anyone see what I'm missing?.. (system background, LL 9.7, MSSql 2000)SELECT a.DataID, b.Name, COUNT(a.AuditStr) AS Views, MAX(a.AuditDate) AS [Date]FROM DTree b INNER JOIN livelink.DAuditNew a ON b.DataID = a.DataIDWHERE (a.AuditStr = 'fetch') AND (b.ParentID = '171488')GROUP BY a.DataID, a.AuditStr, b.NameHAVING (DATEDIFF([day], MAX(a.AuditDate), CURRENT_TIMESTAMP) < 30)ORDER BY a.DataIDI'm sure someone has a better (MS) SQL eye than I..
Find more posts tagged with
Comments
There are no comments yet