Book a Demo

Author Topic: Object_ID  (Read 3493 times)

Gregg Noud

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Object_ID
« on: August 09, 2014, 04:58:13 am »
When using a find command like
Select * from t_Object order by Object_ID
The result is sorted as if Object_ID is text and not Integer.
When we look at the table structure from within SQL Mgmt Studio, Object_ID is (PK,int, notNULL)  so we would expect the sort to sort numerically, but instead it appears to sort as a string
It appears that even though the data in the SQL repository is numeric, Sparx loads this data as some sort of text field because when it sorts the data it sorts like text...is there a logical reason for this or is this a bug
« Last Edit: August 09, 2014, 04:58:43 am by greggnoud »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Object_ID
« Reply #1 on: August 09, 2014, 05:25:08 am »
There was a recent thread about EA not obeying the ORDER statement (in a different context). It boils down to: it is as it is. Send a feature request/bug report but don't expect too much positive response.

May I ask why you want to sort according to object_id? On a first sight I can't see any reason for having the need of doing so.

q.

Gregg Noud

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Object_ID
« Reply #2 on: August 09, 2014, 07:48:53 am »
We are new to the use of the tool...we were looking at how many elements have been created and we are finding folks putting in duplicates...We did a SQL command asking to display all objects in the object table and order them by object_ID...the resulting list started at 10004, ran numerically through 14241, then went to 3012 and ran numerically through 9998...numbers not exact...it was momentarily confusing...and we were intrigued

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Object_ID
« Reply #3 on: August 09, 2014, 08:02:29 pm »
I see, but likely nothing to be worried about. You'd better sort according to the creation date. I guess that makes more sense  :)

q.