I've been trying to get some reporting working on package history and experience some 'challenges' to obtain the right set of data.
What I need is the (average) time it takes (or took) for a package to get from state X to state Y in a given environment.
I can get a per environment list of all Created, Promote and Demote actions from table harPkgHistory (plus the date/time of execution). But when a package has been promoted/demoted into a state more than once, the query returns too many rows.
It is returning multiple rows because you aren't filtering on the latest date. You will probably want to use a max(date) function to select the latest promote date to the State Y. This will then ignore any promotions that were performed before the max(date) in your resultset.
Cheers,
Warren
CMCrossroads is a TechWell community.
Through conferences, training, consulting, and online resources, TechWell helps you develop and deliver great software every day.