Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: BCGoitcwoodard on April 06, 2024, 02:29:11 am

Title: EA - SQL to show hierarchy of packages?
Post by: BCGoitcwoodard on April 06, 2024, 02:29:11 am
Hi -  Can someone share a SQL (SQL Server) query to show the hierarchy of packages in a "project"?  A query to run against the Sparx repository.
Thank you,
CCW
Title: Re: EA - SQL to show hierarchy of packages?
Post by: Geert Bellekens on April 06, 2024, 02:44:14 am
query t_package, and join on package_ID = parent_ID

Geert
Title: Re: EA - SQL to show hierarchy of packages?
Post by: BCGoitcwoodard on April 06, 2024, 05:35:19 am
Thanks.  And does t_object.ParentID for a column get you to the containing table's object_id?

And then the table's t_object.package_id get you to the containing package's package_id?
Title: Re: EA - SQL to show hierarchy of packages?
Post by: Geert Bellekens on April 06, 2024, 05:47:15 pm
Columns are stored in t_attribute

t_object.ParentID will give you the owning object.
t_object.Package_ID links to the owning package.

Geert
Title: Re: EA - SQL to show hierarchy of packages?
Post by: BCGoitcwoodard on April 10, 2024, 12:34:42 am
Thanks!