SQL adaptation guide for SAP Sybase ASE 16.x / Data manipulation |
Informix® supports MATCHES and LIKE in SQL statements, while Sybase ASE supports the LIKE statement only.
The MATCHES operator of Informix uses the star (*), question mark (?) and square braces ([ ]) wildcard characters. The LIKE operator of SQL SERVER offers the percent (%), underscore (_) and square braces ([ ]) wildcard characters:
( col MATCHES 'Smi*' AND col NOT MATCHES 'R?x[a-z]' ) ( col LIKE 'Smi%' AND col NOT LIKE 'R_x[a-z]' )
However, for maximum portability, consider replacing the MATCHES expressions to LIKE expressions in all SQL statements of your programs.
Avoid using CHAR(N) types for variable length character data (such as name, address).
See also: MATCHES and LIKE operators.