The following are examples of what SQLNativeSql might return for the following input SQL string containing the scalar function CONVERT. Assume that the column empid is of type INTEGER in the data source:
SELECT { fn CONVERT (empid, SQL_SMALLINT) } FROM employee A driver for Microsoft SQL Server might return the following translated SQL string:
SELECT convert (smallint, empid) FROM employee
A driver for ORACLE Server might return the following translated SQL string:
SELECT to_number (empid) FROM employee
A driver for Ingres might return the following translated SQL string:
SELECT int2 (empid) FROM employee
For more information, see Direct Execution and Prepared Execution.