SQLPrepare and SQLNativeSQL escape sequences and scalar functions

ODBC has escape sequences and scalar functions that can be used to avoiding having to code directly to the syntax of a particular DBMS's version of SQL.

See Microsoft's ODBC specification on how to use escape sequences. The following ODBC escape sequences are supported by the iSeries™ Access for Windows® ODBC driver.

Escape sequences:

Scalar functions mapped by the ODBC driver to the DB2 UDB for iSeries SQL syntax:

Note: All other scalar functions are supported natively in the DB2 UDB for iSeries SQL syntax, so no mapping is required.