SQL to Return List of files currently checked out.

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
netoguy
Posts: 1
Joined: Tue Oct 10, 2006 9:57 am

SQL to Return List of files currently checked out.

Post by netoguy » Tue Oct 10, 2006 10:01 am

Could anyone provide me the SQL statement to return a list of all the currently checked out files along with the date they were checked out and the user who has them checked out?

(I'm wanting to write a application that will send weekly reminders to any person that has files checked out for more than a certain length of time.)

Thank you!

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Oct 11, 2006 8:05 am

For Vault 3.5.1 and less, you'll need to know the the repository's current checkout list.

Code: Select all

SELECT name, currentcolistid FROM sgvault.dbo.tblrepositories
Using the Checkout List ID, select from items -

Code: Select all

SELECT * FROM sgvault.dbo.tblcheckoutlistitems WHERE colistid = <currentcolistid_from_above>
Jeff Clausius
SourceGear

Post Reply