Book a Demo

Author Topic: Help with SQL Scratch pad  (Read 3109 times)

whyamidoingthis

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Help with SQL Scratch pad
« on: April 08, 2022, 11:11:22 am »
I am trying to generate a SQL Scratch pad search that i can import into a template fragment that will search for a specific stereotype and keyword. I can get the correct output with the simple search tool, but cant find the necessary elements to call keyword in the sql scratch pad. What i have so far is:

SELECT t_object.name AS CLASSGUID, Object_Type AS CLASSTYPE, Name, Stereotype, Version FROM t_object Where Stereotype = "ActualResource"

I'm looking for a way to add keyword = "boat" or something like that so i get all the actual resources that are boats

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Help with SQL Scratch pad
« Reply #1 on: April 08, 2022, 04:38:34 pm »
the keywords field is stored in PDATA5

Code: [Select]
SELECT o.name AS CLASSGUID, o.Object_Type AS CLASSTYPE, o.Name, o.Stereotype, o.Version
FROM t_object o
Where o.Stereotype ='ActualResource'
and o.PDATA5 = 'boat'

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Help with SQL Scratch pad
« Reply #2 on: April 08, 2022, 07:30:25 pm »
You probably should use wildcards for the keywords since it's an arbitrary string.

q.