1
Suggestions and Requests / SQL query left join with nested select
« on: April 22, 2015, 12:50:50 am »
Hi,
i'm trying to retrieve requirements from a locally stored repository. The idea was, to retrieve the requirements hierarchy by selecting the parent object id (if any) via an existing relationship for each requirement. I tried to use the following SQL query:
select o.Object_ID, o.Name, o.Object_Type, t.Start_Object_ID as Parent_Object_ID
from t_object o
left join (select Start_Object_ID, End_Object_ID from t_connector where Stereotype = 'deriveReqt') t on o.Object_ID = t.End_Object_ID
where
o.Object_Type = 'Requirement'
Unfortunately, it ends with an SQL error message. I believe, that there could be some restrictions about the nested left join / select construct. Is there any suggestion about such a selection?
Thank you in advance.
Wolfgang
i'm trying to retrieve requirements from a locally stored repository. The idea was, to retrieve the requirements hierarchy by selecting the parent object id (if any) via an existing relationship for each requirement. I tried to use the following SQL query:
select o.Object_ID, o.Name, o.Object_Type, t.Start_Object_ID as Parent_Object_ID
from t_object o
left join (select Start_Object_ID, End_Object_ID from t_connector where Stereotype = 'deriveReqt') t on o.Object_ID = t.End_Object_ID
where
o.Object_Type = 'Requirement'
Unfortunately, it ends with an SQL error message. I believe, that there could be some restrictions about the nested left join / select construct. Is there any suggestion about such a selection?
Thank you in advance.
Wolfgang