Author Topic: SQL To Retrieve Connected Elements  (Read 544 times)

SteveC

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
SQL To Retrieve Connected Elements
« on: October 09, 2018, 06:40:34 am »
Does anyone have SQL statement to retrieve the distinct IDs for the elements connected (start or end) to another element? For example, what are all the distinct element identifiers connected to the element with an identifier of 123?

SQL is not my strongest language and I would appreciate any assistance.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7276
  • Karma: +84/-12
    • View Profile
Re: SQL To Retrieve Connected Elements
« Reply #1 on: October 09, 2018, 01:38:01 pm »
Here's a start.

Code: [Select]
select Start_Object_ID as ID from t_connector where End_Object_ID=123
union
select End_Object_ID as ID from t_connector where Start_Object_ID=123
Eve

support@sparxsystems.com