Database Query in the Directory Service

Some directory service routines accept a query string and some also an order string. This allows application programs to select subsets of equipment according to special criteria, following the SQL language syntax.

General query

A typical database query in the directory service is on a single database table or view:
SELECT column1, column2, column3 ...
FROM   basetable
WHERE  query
Where query is a string like: and column1, column2, ... are names of the base table columns. Atomic conditions are linked together with AND and OR. Valid column names are documented in the description of the table or view. Note the single quotes inside the query string.

Query with wildcards

A special case is a condition with wildcards: The atomic condition may then be:

Order string

This allows ordering of the results of the query alphabetically and numerically according to the sequence of columns: more complex ordering criteria according to functions of column values are possible.