Comparison Operators

Depending on your database, may include: <, <=, <>, =, >, >=. Use these operators when comparing a column value to a single numeric or data value.

Table 46. Examples

ExampleDescription

S.CUSTOMERS.ZIP > 94400

Retrieves all zip codes over 94400

S.CUSTOMERS.CUST_NUM = 100011

Retrieves data only for Customer #100011

S.DEPT.LOC <> 'Denver

Retrieves data for all department locations except Denver

When doing comparisons on date columns, you may have to use a string-to-date function. Check your database documentation for the syntax of this function. For example, the Oracle database uses the following syntax:

HIREDATE>=to_date('01-Jan-1990') returns all rows where the HIREDATE column is more recent than 01-Jan-1990.

Note:

To build complex where clauses such as the above example, you must use the Add Custom button from the Where Clause Builder screen to custom build your clause.