Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: baitu on June 13, 2018, 12:06:21 am

Title: How to Custom SQL Query for a Specific Package When Generating a Document?
Post by: baitu on June 13, 2018, 12:06:21 am
Hi everyone,

I am trying to generate a document for a specific package, and I am using a custom SQL query to get the data that I want from this package. However, no matter how I change the document template, the Custom SQL Query always takes data from the entire database instead of the package that I’m generating the document for.

How can I make sure that the Custom SQL Query is only querying the package that I specify for document generation?
(Without specifying the package number or name in the query - in order to make this more automated)

Any help or advice would be greatly appreciated!
Title: Re: How to Custom SQL Query for a Specific Package When Generating a Document?
Post by: Geert Bellekens on June 13, 2018, 02:11:20 am
Use #PACKAGEID# macro

See also: https://www.sparxsystems.com/enterprise_architect_user_guide/14.0/model_publishing/custom_sql_fragments.html (https://www.sparxsystems.com/enterprise_architect_user_guide/14.0/model_publishing/custom_sql_fragments.html)

Geert
Title: Re: How to Custom SQL Query for a Specific Package When Generating a Document?
Post by: baitu on June 13, 2018, 03:50:20 am
Thank you!! This is exactly what I was looking for