Created On:  06 September 2012


How do you query for all requirements of a particular requirement type along with what requirements these trace to using the Export to Access schema?


This information can be returned using the steps detailed below:

1. When exporting the data to Access make sure to include both the ‘RequirementInfo’ and ‘TraceTo’ tables.
2. Use the query below to return the requirements for the specified requirement type, along with what requirements these trace to (includes tag and requirement id).

SELECT r1.[tag] as ‘Requirements in Req Type’, r2.[tag] as ‘Trace To’
FROM RequirementInfo AS r2, RequirementInfo AS r1
INNER JOIN TraceTo ON [TraceTo].[id_number]=r1.[id_number]
WHERE r1.Type='Requirement Type Name' and [TraceTo].[to_id_number] = r2.[id_number];

Example screenshot of output in Access:

Incident #2588733