Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: philchudley on March 02, 2022, 03:46:47 am
-
Hi All
I personally do not use Firebird as an EA repository, but I have a client who does, and I have run into a SQL Query problem.
Using a SQL query like the one shown below:
SELECT t_object.Name
FROM t_object, t_objectproperties
WHERE t_object.Object_ID = t_objectproperties.Object_ID
AND t_objectproperties.Property = 'Publish?'
AND t_objectproperties.Value = 'Yes'
Fails since Value is a reserved word, but certainly is the column name.
Value is highlighted in Blue in the SQL Scratch Pad but works in other repository formats, so how do you use the t_objectproperties.Value column in SQL queries for Firebird?
Thanks
Phil
-
Phil,
You have to escape the keywork in that case.
For SQL Server or Access that is done using the square brackets.
In Firebird it seems to double quotes
https://stackoverflow.com/questions/1800841/using-reserved-word-timestamp-as-a-field-name-firebird-2-5 (https://stackoverflow.com/questions/1800841/using-reserved-word-timestamp-as-a-field-name-firebird-2-5)
AND t_objectproperties."Value" = 'Yes'
Geert
-
Thanks Geert much appreciated
All the best
Phil
-
I use square brackets to escape Firebird reserved words, works for me