1
General Board / Re: Usage of the Macro #Branch#
« on: June 23, 2011, 03:58:19 pm »
Actually there are some strange things around the SQL-Queries going on.
There seems to be difference between a SQL-Query and a SQL-Query within the Search Builder. Only the Search Builder seems to expand the Macros #Branch#, #Package# or #DB#. In the SQL Query this is simply a syntax error.
Furthermore there are strange relation regarding the UPPERCASE notation of SQL keywords.
For example:
The statement A: select c.ea_guid AS CLASSGUID, c.object_type AS CLASSTYPE, c.name AS Name from
t_object c
where
c.name rlike '<Search Term>'
and (
(c.package_id in (#Branch# ) or c.package_id = #Package#)
)
and the statement B: select c.ea_guid as CLASSGUID, c.object_type as CLASSTYPE, c.name as Name from
t_object c
where
c.name rlike '<Search Term>'
and (
(c.package_id in (#Branch# ) or c.package_id = #Package#)
)
are syntactically equal. And both statements can be successfully executed as a Search in Search Builder. But one of the statements can NOT be seen in the selection of a search with in the Model Views Properties of a Search Folder. The statement with the LOWERCASE "as" are there invisible and therefore unselectable. Very tricky to find and understandable. But there it is.
Now it is working just fine.
With best regards
Hartmut Jung
There seems to be difference between a SQL-Query and a SQL-Query within the Search Builder. Only the Search Builder seems to expand the Macros #Branch#, #Package# or #DB#. In the SQL Query this is simply a syntax error.
Furthermore there are strange relation regarding the UPPERCASE notation of SQL keywords.
For example:
The statement A: select c.ea_guid AS CLASSGUID, c.object_type AS CLASSTYPE, c.name AS Name from
t_object c
where
c.name rlike '<Search Term>'
and (
(c.package_id in (#Branch# ) or c.package_id = #Package#)
)
and the statement B: select c.ea_guid as CLASSGUID, c.object_type as CLASSTYPE, c.name as Name from
t_object c
where
c.name rlike '<Search Term>'
and (
(c.package_id in (#Branch# ) or c.package_id = #Package#)
)
are syntactically equal. And both statements can be successfully executed as a Search in Search Builder. But one of the statements can NOT be seen in the selection of a search with in the Model Views Properties of a Search Folder. The statement with the LOWERCASE "as" are there invisible and therefore unselectable. Very tricky to find and understandable. But there it is.
Now it is working just fine.
With best regards
Hartmut Jung