Attribute comparison operators include: =, <, >, =<, =>, <>.
The following examples use the = operator; however, any of the attribute operators can be substituted.
Example 1:
SELECT * FROM table WHERE city='Austin'
If the data source provider supports the = operator, the entire statement is delegated to the data source provider.
If the data source provider doesn't support the = operator, Spectrum Spatial will ask the data source provider to carry out the select clause without the WHERE clause.
SELECT * FROM table
SELECT * FROM <results from the delegation> WHERE city='Austin'
SELECT pop FROM table WHERE city='Austin'
If the data source provider supports the = operator, the entire statement is delegated to the data source provider.
If the data source provider does not support the = operator, only part of the query is delegated, as follows:
SELECT pop,city FROM table
SELECT pop FROM <results from the delegation> WHERE city='Austin'
Example 3:
SELECT pop FROM table WHERE UPPER(city)='Austin'
SELECT pop,city FROM table
SELECT pop FROM <results from the delegation> WHERE UPPER(city)='Austin'
Example 4:
SELECT state FROM table WHERE pop/area=5000
SELECT state, pop, area FROM table
SELECT pop FROM <results from the delegation> WHERE pop/area=5000