CRITICAL
Rule Definition
Identify !=, !> and !< operators in SQL WHERE clauses:
- to prevent portability issues
- applicable only for embedded sql
Remediation
Check the statement and if so, !=, !> and !< operators with <>, <= or >=<
Violation Code Sample
The following SQL WHERE clause should be reviewed:
Select col1, col2, col3
From table1
Where col1 != 1
and col2 !< 2
and col3 !> 3
Order By col1, col2;
Fixed Code Sample
Replace non-ANSI operators:
Select col1, col2, col3
From table1
Where col1 <> 1
and col2 <= 2
and col3 >= 3
Order By col1, col2
Related Technologies
Technical Criterion
Architecture - OS and Platform Independence
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.