I have a Livereport that is based on a Custom Livelink category. It searches for documents that have the category applied to them based on certain criteria (Department and Review Date). The documents reside in a Livelink folder but also reside in an archived workflow attachments container. How can I limit the search to only the Livelink folder and not the Livelink Workflow Attachments (I am getting multiple results for the same document. The document names are the same in both the workflow and in Livelink and they both have the Category applied to them.
Following is my SQL and I am attaching a Word doc with a screenshot of my LiveReport.
SELECT a.name, b.valdate as "Docreview", decode(c.valstr,null,' ',c.valstr) as "Docnum", e.valstr as "Facility", f.valstr as "Dept", x.name as "Docowner" FROM kuaf x, dtree a, llattrdata b, llattrdata c, llattrdata e, llattrdata f, llattrdata g WHERE x.id = g.valint and a.dataid = b.id and a.versionnum = b.vernum and b.defid = 862314 and b.attrid=10 and a.dataid = c.id and a.versionnum = c.vernum and c.defid = 862314 and c.attrid=12 and a.dataid = e.id and a.versionnum = e.vernum and e.defid = 862314 and e.attrid=6 and a.dataid = f.id and a.versionnum = f.vernum and f.defid = 862314 and f.attrid=5 and a.dataid = g.id and a.versionnum = g.vernum and g.defid = 862314 and g.attrid=22 and a.subtype = 144 and f.valstr = 'Customer Service' and b.valdate >= %1 and b.valdate <= %2 ORDER BY "Docreview"