Author Topic: SQL query for getting component description  (Read 5642 times)

Alexander.Golyshkin

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
SQL query for getting component description
« on: October 04, 2024, 01:43:21 am »
Hi Support team,

Could say how can I get a component description (Properties->General the field below component name) using SQL query?




Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13285
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: SQL query for getting component description
« Reply #1 on: October 04, 2024, 03:37:06 pm »
Hi Support team,

You are mistaken. This is a user forum. If you want to contact sparx support you can send an email to [email protected]

About the query, the description of a component (or any other element) is stored in t_object.Note

Geert

Alexander.Golyshkin

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: SQL query for getting component description
« Reply #2 on: October 04, 2024, 04:29:39 pm »
About the query, the description of a component (or any other element) is stored in t_object.Note

I have tried to execute following SQL query under Sparx Architect v15.2
Code: [Select]
select Object_ID, Note from t_object where t_object.Object_ID=834
and it's displayed just one object_id field

Code: [Select]
SELECT * from t_object
also don't show any Note field in output result... Is it a bug of Sparx Architect, what do you think?

Also in additional, do you know the table & field name which contains FQName value for components?
« Last Edit: October 04, 2024, 04:46:26 pm by Alexander.Golyshkin »

Takeshi K

  • EA User
  • **
  • Posts: 571
  • Karma: +35/-1
    • View Profile
Re: SQL query for getting component description
« Reply #3 on: October 04, 2024, 04:54:29 pm »
Hello Alexander

The behaviour about showing Notes is NOT a bug.
To show the Notes, press the second button from right in the toolbar to open the menu, then select View Notes > Notes Preview or Full Notes.

Another workaround, using 'AS' like 'SELECT Note AS NT FROM t_object' shows the Notes as the same manner as other properties.

HTH,
--
t-kouno

Alexander.Golyshkin

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: SQL query for getting component description
« Reply #4 on: October 04, 2024, 05:39:29 pm »
Hello Alexander

The behaviour about showing Notes is NOT a bug.
To show the Notes, press the second button from right in the toolbar to open the menu, then select View Notes > Notes Preview or Full Notes.

Another workaround, using 'AS' like 'SELECT Note AS NT FROM t_object' shows the Notes as the same manner as other properties.

HTH,

Thnx, this approach from Sparx Architect team is not obviously for user experience...

Takeshi K

  • EA User
  • **
  • Posts: 571
  • Karma: +35/-1
    • View Profile
Re: SQL query for getting component description
« Reply #5 on: October 04, 2024, 06:00:42 pm »
I think you may find this behaviour useful in the future.

In the 'normal' list (i.e. right click on a diagram background | Switch View | Switch to List View), the notes tend to be long text, so displaying the notes like this (and we can select part or all of the notes) makes it easy to read the notes.

In the SQL Scratch Pad, we can select any column in the table to display separately by specifying 'AS NOTE'. For example, the StyleEx column of the t_diagram table usually contains long text, so 'SELECT Diagram_ID, StyleEx AS NOTE from t_diagram' makes it easier to read and check the column.
--
t-kouno