Book a Demo

Author Topic: SQL Search Specifications for EA  (Read 3144 times)

Stefan Bolleininger

  • EA User
  • **
  • Posts: 308
  • Karma: +0/-0
    • View Profile
SQL Search Specifications for EA
« on: November 12, 2011, 12:58:53 am »
Hi!

i wonder if there are any documentated specifications for the EA SQL-Search?

When is use a Union Search for two tables

"SELECT "isObject", Object_Type, CreatedDate, Status, null, null, null, null, null, null FROM t_object
Union All
SELECT "isTest", null, null, null, Object_Id, Test, TestClass, TestType, `Status`, DateRun FROM t_objecttests"

I get the correct result from my Database but I haven't the right one in my EA Model search.

In my EA-Search all Fields for "isObject" are filled but "isTest'" is completely empty.
By rotating the Search to:

"SELECT "isTest", null, null, null, Object_Id, Test, TestClass, TestType, `Status`, DateRun FROM t_objecttests
Union All
SELECT "isObject", Object_Type, CreatedDate, Status, null, null, null, null, null, null FROM t_object"

my isTest is correct but Object_type and CreatedDate is empty. :o

What specials for EA-Search do you know?

Enterprise Architect in "safetycritical development" like medical device industry. My free Add-in at my Website

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: SQL Search Specifications for EA
« Reply #1 on: November 14, 2011, 08:25:07 am »
It sounds like you are running mysql. There is an oddity we've found that unions containing strings will restrict the column length to the length of the first entry.

Try using something like space(50) instead of null.

Of course, you can ignore that suggestion if you're not using mysql.