Creating SQL queries
In the
Query page, the
Optiva
administrator can create SQL queries that can be used for the
Search <Object> pages. The
Class field in the
Query page must use this naming convention:
SEARCH.DIY.<search symbol name>
DIY
- as in “Do It Yourself”
The
SEARCH.DIY.FORMULA
class indicates that the query can be
used for the
Search Formula page.
The
SEARCH.DIY.ITEM
class indicates that the query can be
used for the
Search Item page.
These queries are available for selection in the
SQL Search Query drop list for
the respective
Search page. In other words, the
SEARCH.DIY.ITEM
class query is available for selection
only in the
Item Search page. It is not available for selection
in the other
Search <object> pages.
The
Select
statement in your query should include only the
key code for the object. For version-supported objects, such as Formula and
Ingredient Statement, use
formula_id
and
label_id
.