Created On:  05 July 2011

Problem:

How do you retrieve the total number of pending executions for a project?

Resolution:

To return the total number of pending executions for a project you can run the following SQL query:

SELECT COUNT ([TE].[ExecDefRunID_pk_fk]) As 'Pending Executions'
  FROM TM_V_ExecDefRuns TE
WHERE [TE].[Status] = '7'
AND ProjectID_fk = 0

The default project used above is the "Demo Project" (id- '0').  Alter this for any project you wish to return.