The Comparison Operators

SAP ASE uses certain comparison operators.

Operator

Meaning

=

Equal to

>

Greater than

<

Less than

>=

Greater than or equal to

<=

Less than or equal to

<>

Not equal to

!=

Not equal to (Transact-SQL extension)

!>

Not greater than (Transact-SQL extension)

!<

Not less than (Transact-SQL extension)

In comparing character data, < means closer to the beginning of the server’s sort order and > means closer to the end of the sort order. Uppercase and lowercase letters are equal in a sort order that is case-insensitive. Use sp_helpsort to see the sort order for your server. For comparison purposes, trailing blanks are ignored.

In comparing dates, < means earlier than and > means later than.

Put single or double quotes around all character and date and time data used with a comparison operator:

= "Bennet" 
  "May 22 1947"