Author Topic: FInd all elements of type Issue  (Read 10790 times)

GrahamL

  • EA User
  • **
  • Posts: 111
  • Karma: +2/-0
    • View Profile
FInd all elements of type Issue
« on: November 11, 2021, 10:51:30 pm »
Hi
Been away from EA for a while
How do I use model search to find all elements that are of type Issue

Thanks

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: FInd all elements of type Issue
« Reply #1 on: November 12, 2021, 12:14:03 am »
SELECT * FROM t_object WHERE object_type = "Issue"

You might add those CLASSTYPE stuff but that one works as well.
q.

GrahamL

  • EA User
  • **
  • Posts: 111
  • Karma: +2/-0
    • View Profile
Re: FInd all elements of type Issue
« Reply #2 on: November 12, 2021, 12:57:03 am »
Thanks but I get 'Invalid column name 'issue'

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: FInd all elements of type Issue
« Reply #3 on: November 12, 2021, 02:05:37 am »
Means you have not entered the query correctly as above.

q.

GrahamL

  • EA User
  • **
  • Posts: 111
  • Karma: +2/-0
    • View Profile
Re: FInd all elements of type Issue
« Reply #4 on: November 12, 2021, 02:18:22 am »
Copied and pasted into new model search's SQL editor - still get the same

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: FInd all elements of type Issue
« Reply #5 on: November 12, 2021, 06:22:28 am »
Can't be (or so). The message says that you try a SELECT ... FROM Issue which would obviously be wrong. Which EA version is yours?

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: FInd all elements of type Issue
« Reply #6 on: November 12, 2021, 07:39:30 am »
What's your DB type? It might not like double quotes. Try

Code: [Select]
SELECT * FROM t_object WHERE Object_Type = 'Issue'
The Sparx Team
[email protected]

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: FInd all elements of type Issue
« Reply #7 on: November 12, 2021, 09:59:27 pm »
Ah, the quotes for SQL Server....

q.