Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RM LiveReport

Status
Not open for further replies.

brettsanders

IS-IT--Management
Nov 28, 2007
30
US
I am trying to write a report that shows all new folders based on date and root folder (specified by user) that do not have rm classifications applied. I have a report that shows all new folders, however i believe my logic is flawed to get the folders that dont have RM applied. Have a look at my sql statement and let me know where i'm wrong.


----start sql----

SELECT ROOT_Folder_Name=(select [Name] FROM [Livelink].[dbo].[DTree] where [DataID] = %1) , CONVERT( varchar , %2, 101 ) as From_Date , Name as New_Folder_Name , dbo.GET_FOLDER_TREE(DataID) as New_Folder_Path , Owner=(SELECT Name FROM KUAF WHERE (ID = DTree.UserID)), LLClassify.CID as Classification, convert(varchar, CreateDate, 102 ) as TheCreateDate , convert(varchar, ModifyDate, 102 ) as TheModifyDate, DTree.* FROM DTree LEFT OUTER JOIN LLClassify ON DTree.DataID = LLClassify.CID WHERE DataID in (select DataID from DTreeAncestors where AncestorID = %1 or DataID = %1) AND (CreateDate > %2 and ((SubType=0) or (SubType=136) or (SubType=201) or (SubType=136) ) and (LLClassify.CID IS NULL) ) order by New_Folder_Path

-----end sql-----
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top