Book a Demo

Author Topic: Exclude packages from report by Custom SQL  (Read 4770 times)

survex

  • EA User
  • **
  • Posts: 76
  • Karma: +1/-1
    • View Profile
Exclude packages from report by Custom SQL
« on: April 09, 2015, 01:34:57 am »
Say I have model and I want to exclude all packages which name ends by "--" like following pattern "*--".

I've playing around with Generate Documentation > Options > Except where Query excludes Custom SQL, but can't figure out how it works.

Does anybody has working examples of such query?

Michel Gibelli

  • EA Novice
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
Re: Exclude packages from report by Custom SQL
« Reply #1 on: April 11, 2015, 02:22:19 am »
Hello,

I asked the same question in :
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1412081849/

and Adam gave me an answer

In my case, I use the following request :
SELECT t_package.Package_ID AS ExcludePackage
FROM t_package, t_object
WHERE t_package.Package_ID = #PACKAGEID#
AND t_object.PDATA1 LIKE t_package.PACKAGE_ID
AND (t_object.stereotype is null or t_object.stereotype <> 'Domaine fonctionnel')


I hope it will help you

Michel
« Last Edit: April 11, 2015, 02:25:29 am by mgfr13 »

survex

  • EA User
  • **
  • Posts: 76
  • Karma: +1/-1
    • View Profile
Re: Exclude packages from report by Custom SQL
« Reply #2 on: April 13, 2015, 05:05:11 am »
Thank you very much!!!

But is there any way to exclude all not only one package found, but all subpackages?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Exclude packages from report by Custom SQL
« Reply #3 on: April 13, 2015, 09:23:15 am »
Recursion in SQL is almost impossible. You could probably hard code a certain depth level. Or you need to use automation.

q.