SQL queries for modifications between labels?
Moderator: SourceGear
SQL queries for modifications between labels?
Hi,
Is it possible to construct SQL queries to do the following:
Given two labels, and a repository folder, list all files that have been modified, created, deleted from the first label up to second label.
The reason I need SQl queries is because I want to incorporate this into our reporting tool, which already does SQL to our issues log and help desk system.
This kind of report would be very useful for release documents.
Thanks.
Is it possible to construct SQL queries to do the following:
Given two labels, and a repository folder, list all files that have been modified, created, deleted from the first label up to second label.
The reason I need SQl queries is because I want to incorporate this into our reporting tool, which already does SQL to our issues log and help desk system.
This kind of report would be very useful for release documents.
Thanks.
Where is the label applied with respect to the folder (is it applied to a parent or a sub-child)?
It would be tough to do, but you could look at comparing results. You'll need tblfsobjectlabels which is the "header" information regarding the label as well as tblfsobjectlabelviews which contain the label's layout.
It would be tough to do, but you could look at comparing results. You'll need tblfsobjectlabels which is the "header" information regarding the label as well as tblfsobjectlabelviews which contain the label's layout.
Jeff Clausius
SourceGear
SourceGear
I would be comparing the folder where the label is actually applied, but I also want to list out recursively all modifications for all sub-child of that folder (that is all sub-child items that inherits the label).jclausius wrote:Where is the label applied with respect to the folder (is it applied to a parent or a sub-child)?
I'll have a look round those tables. Any more hints?jclausius wrote: It would be tough to do, but you could look at comparing results. You'll need tblfsobjectlabels which is the "header" information regarding the label as well as tblfsobjectlabelviews which contain the label's layout.
Thanks for the (usual) lightning quick response!
Timezones?
If I look at tblfsobjectlabels through EntManager, the labeldate field for a label will say 26-05-2005 16:17:13, but through Vault GUI Client History Exploer it would say that the label date is 26-05-2005 17:17:13.
Is this something to do with timezone? Currently UK is UTC+1 due to daylight saving time, and I was wondering whether the db date is UTC, display date is UTC+1 or something like that....
Is this something to do with timezone? Currently UK is UTC+1 due to daylight saving time, and I was wondering whether the db date is UTC, display date is UTC+1 or something like that....
A quicker way to do this, if you're on 3.0.6 or later is to use the Command Line Client's history command. It can accept labels as the beginning and end dates for the query, and prints an xml output. You can then process the output in code to get the specific information you want. It would save you a lot of time learning the Vault DB layout.
Agreed. We have ditched the SQL idea for now, and I will actually use vaulthistory nant task, probably tweaked to add the same capability as the CLC, such as end date or end label (which I think translate it into a datetime anyway?).jeremy_sg wrote:A quicker way to do this, if you're on 3.0.6 or later is to use the Command Line Client's history command. It can accept labels as the beginning and end dates for the query, and prints an xml output. You can then process the output in code to get the specific information you want. It would save you a lot of time learning the Vault DB layout.