Created On:  11 October 2011

Problem:

Is it possible to query if a StarTeam project is linked to other projects?

Resolution:

First get a list of the project ID's
SELECT ID, Name, Description 
FROM
   syn_Project

Then execute this query and substitute 'XX' with the ID of the project.

SELECT * 
FROM syn_viewmember vm JOIN syn_view vw ON vm.viewid = vw.id
WHERE
    projectid = X AND endmodifiedtime = 0 
AND
   vm.deletedtime = 0
AND
  EXISTS
    (SELECT 1 FROM syn_viewmember aa JOIN syn_view bb ON aa.viewid = bb.id WHERE projectid <> XX AND parentvmid = vm.id AND endmodifiedtime = 0 )