XSQL Queries

Using the information provided by the list vtables and list vfields <vtable name> commands, you can run a query to extract information that meets the criteria you specify. Any query you run should be structured as follows:

select <vfields you want to search for, separated by a comma and a space> from <vtables you want to search in, separated by a comma and a space> where <criteria> <criteria operator>;

For example, say you want to search the nodes/node.ID field in the nodes/node-connector table and find every instance of the Hardware-Address object that contains BA in its text string. To do so, you would enter the following query: Select nodes/node.ID from nodes/node-connector where Hardware-Address like ’%BA%’;

The following criteria operators are supported:

 

Table 3.2. Supported XSQL Query Criteria Operators

Criteria Operators

Description

=

Lists results that equal the value you specify.

!=

Lists results that do not equal the value you specify.

like

Lists results that contain the substring you specify. For example, if you specify like %BC%, every string that contains that particular substring is displayed.

<

Lists results that are less than the value you specify.

>

Lists results that are more than the value you specify.

and

Lists results that match both values you specify.

or

Lists results that match either of the two values you specify.

>=

Lists results that are more than or equal to the value you specify.

Lists results that are less than or equal to the value you specify.

is null

Lists results for which no value is assigned.

not null

Lists results for which any value is assigned.

skip

Use this operator to list matching results from a child node, even if its parent node does not meet the specified criteria. See the following example for more information.



loading table of contents...