Book a Demo

Author Topic: Having SQL query search results show up in Relationship Matrix  (Read 4361 times)

mcamack

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
I want to show a mapping of UseCases to Requirements in the Relationship Matrix, but I don't want hundreds of unlinked requirements to show up. I only want the ones to show up which I have linked with a trace arrow on a Use Case Diagram.

I came up with the SQL query below to find the requirement names for the ones that actually have an Abstraction trace to a Use Case. However, when I use this saved search as my 'Target' in the Relationship matrix, nothing shows up. Is this because the SQL query isn't returning an "Object" and is only returning the name? When I set the target to Requirements, they all show up (only some of which have an arrow showing a link).

SELECT O.name FROM t_connector C INNER JOIN t_object O ON C.end_object_id = O.object_id WHERE connector_type = 'Abstraction';

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Having SQL query search results show up in Relationship Matrix
« Reply #1 on: March 03, 2017, 07:21:42 am »
Just poking in the mist, since I never tried that. But try adding
Code: [Select]
ea_guid AS CLASSGUID, Object_Type AS CLASSTYPE, in front to make it like an "ordinary" search.

q.

mcamack

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Having SQL query search results show up in Relationship Matrix
« Reply #2 on: March 03, 2017, 07:27:05 am »
It worked! Genius!

Thanks  :D