1
General Board / Recursive Query for Package Tree Contents
« on: July 13, 2011, 09:12:27 pm »
Hello,
I am using EA-8 with a SQL Server based repository.
I want to extract information related to elements in a package and in lower packages.
For this purpose I need to determine all packages in a specific tree.
A hard-coded query (going only 2 levels deep) is
But this is of course not scalable.
Can one use some kind of Recursive Query syntax? Does anybody have an example?
Thanks
Luc
I am using EA-8 with a SQL Server based repository.
I want to extract information related to elements in a package and in lower packages.
For this purpose I need to determine all packages in a specific tree.
A hard-coded query (going only 2 levels deep) is
Code: [Select]
select t_package.Name Package, t_package.Package_ID, t_package.Parent_ID
from t_package where
t_package.Package_ID in (select t_package.Package_ID from t_package where t_package.Name = '00-000 F Information')
or t_package.Parent_ID in (select t_package.Package_ID from t_package where t_package.Name = '00-000 F Information')
or t_package.Parent_ID in (select t_package.Package_ID from t_package
where t_package.Parent_ID in (select t_package.Package_ID from t_package where t_package.Name = '00-000 F Information')
)
But this is of course not scalable.
Can one use some kind of Recursive Query syntax? Does anybody have an example?
Thanks
Luc