Book a Demo

Author Topic: Doc Generation: t_attribute.default gives error when running query  (Read 3779 times)

EugeneP

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Hi All,

I'm new to EA and have been trying to generate documentation using a SQL query. In writing and testing my query and t_attribute.default keeps showing an "incorrect syntax near the keyword 'Default' error. I need to access the attribute initial values from the model, but keep hitting this issue. Can anyone suggest a work around or alternate solution?

I really appreciate your help.

Best,

Eugene

cRossi

  • EA Novice
  • *
  • Posts: 15
  • Karma: +1/-0
    • View Profile
Re: Doc Generation: t_attribute.default gives error when running query
« Reply #1 on: February 21, 2020, 07:21:13 am »
There will be no solution w/o knowing the full SQL statement.

EugeneP

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Doc Generation: t_attribute.default gives error when running query
« Reply #2 on: February 21, 2020, 08:22:56 am »
Thanks for the quick reply!

I am still working on the query, but it looks like this:

select att.name, att.ID, att.type, att.defualt as 'Value', t_attributetag.ElementID, t_attributetag.Property as TagName, t_attributetag.VALUE as TagValue, att.notes

From t_attribute att

left join t_attributetag
   on att.ID=t_attributetag.ElementID
   
I am trying to create a single table within a template fragment that displays attribute and tag properties, which also isn't working for me... so if you have some suggestions on that I would be grateful.

Thanks!

Eugene

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Doc Generation: t_attribute.default gives error when running query
« Reply #3 on: February 21, 2020, 09:00:05 am »
Default is a keyword. EA specific syntax to correct that is to wrap it in [ and ]

EugeneP

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Doc Generation: t_attribute.default gives error when running query
« Reply #4 on: February 21, 2020, 11:33:17 am »
Thank you! The [] works! Much appreciated.