Hi Forum
I am looking for some help with returning both a count of items which i can do but also the datasize of the objects in the users personal workspace.
I am using the following to return the count
Select -1*d.OwnerID, d.Name,
(Select COUNT(DataID)-1 From DTree Where OwnerID = -1*d.UserID) "Count"
From DTree d, KUAF k
Where SubType = 142
And k.ID = d.UserID
And k.Deleted = 0
Order By d.Name
This works fine for all users but i am having major issues with getting a sum of the datasize objects where i get from DVersData i presume or is there another place this is stored ?
This SQL also works and does bring back count and datasize except it is counting all versions the datasize is ok with this one my problem is i cannot get it to just count most recent versions from DTree.
Select -1*dt.OWNERID "Workspace ID", k.Name,
Count(dt.DataID) "Number of Items",(SUM(dv.DataSize)/1024) "Space Used (KB)"
From KUAF k, DVersData dv, DTree dt
Where k.ID = dv.Owner
And dt.OwnerID = -1*k.ID
And dt.DataID = dv.DocID
And dt.SubType <> 298
Group By k.Name, dt.OwnerID
Order By "Space Used (KB)" DESC
Any suggestions would be greatly appreciated...
Regards, Mike.