Book a Demo

Author Topic: Issue with a SQL Query in Document Template editor  (Read 4162 times)

jplusip

  • EA User
  • **
  • Posts: 69
  • Karma: +0/-0
    • View Profile
Issue with a SQL Query in Document Template editor
« on: October 14, 2015, 02:26:14 am »
Using a selector, I'm grabbing a stereotyped signal and then trying to generate a table based on its parts. The SQL query is:

select p.Name as Property, p.Notes as Description, v.Name as DataType, u.Value as Unit
from t_object as s, t_object as p, t_object as v, t_objectproperties as u
where p.Parent_ID = s.Object_ID and v.ea_guid = p.PDATA1 and u.Object_ID = p.Object_ID and u.Property = 'unit'
order by p.Name, p.Notes, v.Name, u.Value

Where s should be the signal, p should be its parts, v should be the value type that types the part, and u should be the unit (SysML 1.3 tag).

For some reason I keep getting a DAO error saying there are too few parameters, and then when the document is generated it's blank aside from the line of text I'm using to confirm that the selector is working.

I assume there is something simple I'm missing, but I'm just not catching it.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Issue with a SQL Query in Document Template ed
« Reply #1 on: October 14, 2015, 03:45:51 am »
It's Note, not Notes.

And ParentID, not Parent_ID.

The order by Note will likely not work (memo).

q.

Orthogonality? What for. Confusion is soooo nice.
« Last Edit: October 14, 2015, 03:49:15 am by qwerty »

jplusip

  • EA User
  • **
  • Posts: 69
  • Karma: +0/-0
    • View Profile
Re: Issue with a SQL Query in Document Template ed
« Reply #2 on: October 14, 2015, 04:07:50 am »
Thanks! That worked. I knew I just needed a second pair of eyes to catch what I was missing!

Also, I got the Parent_ID from Table 2.1.1 from Inside Enterprise Architect. Does that need to be updated, or did I misunderstand it?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Issue with a SQL Query in Document Template ed
« Reply #3 on: October 14, 2015, 06:06:05 am »
Quote
Also, I got the Parent_ID from Table 2.1.1 from Inside Enterprise Architect. Does that need to be updated, or did I misunderstand it?
This has been correct some time ago. Just download the book again from where you did first.

I got fooled by "To underscore or not to underscore. That is the question."

q.
« Last Edit: October 14, 2015, 06:07:21 am by qwerty »