Book a Demo

Author Topic: Query Builder Object.Name contains Search Term?  (Read 4768 times)

AndyJ

  • EA User
  • **
  • Posts: 337
  • Karma: +5/-3
  • It's only a model
    • View Profile
Query Builder Object.Name contains Search Term?
« on: December 13, 2011, 11:35:15 am »
Hi people,

I'm fiddling around trying to see if I can build a custom search to use EA as a "Data Dictionary"

The following SQL works fine, but I'm hoping to find a method to return a match if the search term is contained within the Object.Name.

Can anyone suggest a method?

I've tried putting wildcards in the Search Term box, and tried
'<Search Term>'IN(t_object.Name) but haven't lucked onto a solution yet.

As an example, I'd like the search term "Order" to return "Sales Order" and "Order Profile".

The current SQL is provided for info.

Andy

SELECT t_attribute.ea_guid AS CLASSGUID, 'Attribute' AS CLASSTYPE,
t_object.Name as Table_Name,
t_object.Tagged,
t_attribute.Name,
t_attribute.Notes,
t_objectproperties.Property,
t_objectproperties.Value
FROM t_attribute, t_object, t_objectproperties
WHERE t_attribute.Object_ID = t_object.Object_ID AND t_object.Object_ID=t_objectproperties.Object_ID AND t_object.Name='<Search Term>'
Sun Tzu: "If you sit by the river long enough, eventually the body of MS Visio floats past."

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Query Builder Object.Name contains Search Term
« Reply #1 on: December 13, 2011, 11:53:36 am »
Try this:

Code: [Select]
AND t_object.Name LIKE '#WC#<Search Term>#WC#'
EA will replace #WC# with the correct wildcard character for the database you're using ('*' for MS Access/EAP files, '%' for everything else).
« Last Edit: December 13, 2011, 11:56:47 am by KP »
The Sparx Team
[email protected]

AndyJ

  • EA User
  • **
  • Posts: 337
  • Karma: +5/-3
  • It's only a model
    • View Profile
Re: Query Builder Object.Name contains Search Term
« Reply #2 on: December 13, 2011, 01:13:01 pm »
Nice!

Andy
Sun Tzu: "If you sit by the river long enough, eventually the body of MS Visio floats past."