Book a Demo

Author Topic: resultset query in search folder not ordered  (Read 3722 times)

mrblack12

  • EA User
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
resultset query in search folder not ordered
« on: March 09, 2016, 03:04:41 am »
Hi,

I've created a search folder under Model views and populated it with the results of a self-defined search query. In the query I've used the "order by" clause and the results from the query itself are neatly ordered, but the same list in the search folder is not. I can't seem to find where or how this list can be ordered as well. Apart from that, it's strange that apparently not all sql statements in the query are processed.

Is this due to the fact that the 'order by' is just a clause and not a proper SQL statement in its own right?

Any thoughts on how to solve this?

Thanx,
Rick

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: resultset query in search folder not ordered
« Reply #1 on: March 09, 2016, 07:55:51 am »
I seem to remember that the order clause had some issue in the past, but that's in the mist of a far area of my brain. I know for sure that EA processes the query before sending it to the DB.

What you can do is to add a minor error to your query, so it produces an error. Then look into %appdata%\sparx...\ea\dberror.txt. This contains the (mangled?) SQL so you can see whether the order clause is still inside.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: resultset query in search folder not ordered
« Reply #2 on: March 09, 2016, 02:18:08 pm »
I do know from experience that EA sometimes ignores the order by clause.
Not sure if it is stripped by EA, or whether EA applies it own ordering to the resultset (based in ID or something )

Geert