cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

SQL Query: Number of items in Vault Store not on legal hold by year.

Hi all,

Today I am trying to work on selecting the number of savesets in a Vault store database grouped by year.

Has anyone done this before or have any pointers on it?

Thanks,

Jeremy.

1 Solution

Accepted Solutions
Highlighted
Accepted Solution!

This should help: select

This should help:

 

select year(s.ArchivedDate) as 'year',
    COUNT(s.SavesetIdentity) 
from saveset s    
where s.SavesetIdentity not in (select SavesetIdentity from HoldSaveset where holdsaveset.savesetidentity = s.SavesetIdentity)
group by year(s.ArchivedDate)

Working for Quadrotech-it.com

View solution in original post

6 Replies
Highlighted
Accepted Solution!

This should help: select

This should help:

 

select year(s.ArchivedDate) as 'year',
    COUNT(s.SavesetIdentity) 
from saveset s    
where s.SavesetIdentity not in (select SavesetIdentity from HoldSaveset where holdsaveset.savesetidentity = s.SavesetIdentity)
group by year(s.ArchivedDate)

Working for Quadrotech-it.com

View solution in original post

Highlighted

Great thank you. I was off in

Great thank you. I was off in a different direction using views.

Highlighted

Does the same query for those

Does the same query for those on legal hold look like this?

select year(s.ArchivedDate) as 'year',
    COUNT(s.SavesetIdentity) 
from saveset s    
where s.SavesetIdentity in (select SavesetIdentity from HoldSaveset where holdsaveset.savesetidentity = s.SavesetIdentity)
group by year(s.ArchivedDate)

Highlighted

Looks right, yep.

Looks right, yep.

Working for Quadrotech-it.com
Highlighted

Great thanks very much!

Great thanks very much!

Highlighted

Just one thing.  Do not tell

Just one thing.  Do not tell anyone I helped you with SQL ...  I tell everone I know nothing about it ..  It makes life more peaceful.   Ooopps I just posted it on the interwebz Smiley Happy

 

Working for Quadrotech-it.com