Book a Demo

Author Topic: SQL query fails for field Constraint in table t_objectconstraint  (Read 3750 times)

gjvandijk

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Hi,
I tried to create a sql query on the t_objectconstraint table with a selection on field Constraint.
On an eapx file this works fine, but when I tried to use it on a sql server repository de query fails with error:Incorrect syntax near the keyword 'Constraint'.

SQL Query(simplyfied):
Select t_objectconstraint.*
FROM t_objectconstraint
WHERE Constraint = 'SOURCETABLE'

So it appears to met that Constraint is a reserved word for SQL server databases.
Is there a workaround for this?




Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: SQL query fails for field Constraint in table t_objectconstraint
« Reply #1 on: October 03, 2018, 01:59:38 am »
Code: [Select]
Select t_objectconstraint.*
FROM t_objectconstraint
WHERE [Constraint] = 'SOURCETABLE'

Geert