Author Topic: <Search Term> not substituted in native SQL  (Read 392 times)

N_i_c_o_l_e

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
<Search Term> not substituted in native SQL
« on: September 21, 2010, 05:29:40 pm »
Hi,

I'm using EA 8.0.861 with a local EAP file. Running this simple query doesn't return any result unless a use case is actually named "<Search Term>":

SELECT c.ea_guid AS CLASSGUID, c.Object_Type AS CLASSTYPE, c.Name AS Name
FROM t_object c
WHERE c.Object_Type = 'UseCase' AND c.Name LIKE '<Search Term>'

Leaving out the Search Term condition does return as expected all use cases in the model.

Any ideas?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7812
  • Karma: +171/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: <Search Term> not substituted in native SQL
« Reply #1 on: September 21, 2010, 06:08:08 pm »
How do you know it doesn't get substituted?
Have you tried with wildcards?
Code: [Select]
SELECT c.ea_guid AS CLASSGUID, c.Object_Type AS CLASSTYPE, c.Name AS Name
FROM t_object c
WHERE c.Object_Type = 'UseCase' AND c.Name LIKE '*<Search Term>*'

Geert

N_i_c_o_l_e

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: <Search Term> not substituted in native SQL
« Reply #2 on: September 21, 2010, 06:30:38 pm »
That is exactly what I tried before, and the only matching use cases were the ones named "<Search Term>" or "foo <Search Term> bar", no matter what I had put in the Search Term field of Model Search.

On the other hand, I have several use cases with the word Account in their name, and the query returns 0 results with the described SQL query.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7812
  • Karma: +171/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: <Search Term> not substituted in native SQL
« Reply #3 on: September 21, 2010, 06:52:20 pm »
Nicole,

I just tried on v 8.0.862 with a local eap file, and your search query works just fine here.
I have tried with or without wildcard, and I even tried switching on "use jet 4.0" just to see if that made any difference, but no, it keeps working no matter what.

Maybe you can try upgrading to 8.0.863, but I doubt that will make a difference. If it doesn't, I would ask Sparx support for help.

Geert

N_i_c_o_l_e

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: <Search Term> not substituted in native
« Reply #4 on: September 21, 2010, 07:42:23 pm »
Issue gone. My bad. It appears when you hit F5 ("Run SQL" in the SQL toolbar), the Search Term is not taken into consideration. The Run button in the Model Search does the job. Thanks Geert.
« Last Edit: September 21, 2010, 07:43:15 pm by Nicole99 »