Oracle database
SELECT SUBSTR( col1,
1,
col2)
FROM DUAL;
* col1 and col2 are assumed to be CHAR type
Symfoware Server
CREATE CAST (CHAR AS INTEGER) WITH INOUT AS IMPLICIT;
SELECT SUBSTR( col1,
1,
col2)
FROM DUAL;
# No changes to SELECT statement;
* col1 and col2 are assumed to be CHAR type
If the type can be converted to a data type that can be specified for function arguments, conversion is performed implicitly.
If the data types are different from each other, or if loss of significance occurs, implicit conversion is not performed.
Since the data type of the string length is clear, first execute the following CREATE CAST only once so that the CHAR type value (col2 in the example) specified for the string length is implicitly converted to INTEGER type.
CREATE CAST (CHAR AS INTEGER) WITH INOUT AS IMPLICIT;