sqlclearquest

Rational ClearQuest : sql query get Watchers accociated with a particular CQ issue


I am trying to query this database cq_production_user that is part of IBM Rational ClearQuest.

I have been launching these queries from sql server express 2008 client.

How do I get all of the Watchers associated with a particular ClearQuest issue?


Solution

  • Well this is what it turned out to be.

    @dbidCQIssue varchar(50)
    AS
    
    --DECLARE @dbidCQIssue varchar(50)
    --SET @dbidCQIssue = 'CQ00105687'
    
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
    
    -- Insert statements for procedure here
    SELECT fullname as 'fullname'
    
    FROM cqadmin.users
    
    WHERE dbid in(SELECT    
    link_builds.child_dbid
    FROM cqadmin.issue iss
    
    LEFT JOIN [cq_production_user].[cqadmin].[parent_child_links] AS link_builds 
        ON link_builds.[parent_dbid] =  iss.dbid
    LEFT JOIN [cq_production_user].[cqadmin].[build] ON [cq_production_user].[cqadmin].[build].[dbid] = link_builds.[child_dbid] 
    LEFT JOIN [cq_production_user].[cqadmin].[project] ON [cq_production_user].[cqadmin].[project].[dbid] = [cq_production_user].[cqadmin].[build].[project]
    LEFT JOIN [cq_production_user].[cqadmin].[branch] ON [cq_production_user].[cqadmin].[branch].[dbid] = [cq_production_user].[cqadmin].[build].[branch]
    LEFT JOIN [cq_production_user].[cqadmin].[users] ON [cq_production_user].[cqadmin].[users].[dbid] = iss.dbid
    
    WHERE iss.id = @dbidCQIssue   
    )
    
    END
    

    Rational Clearquest where everything is a left outer join