CONNX will implicitly convert data to similar or otherwise appropriate datatypes where possible in expressions.
Arithmetic operations:
CONNX will uplift the datatype of the dissimilar operands according to the table below. Two dissimilar data types will be converted to the type with the highest priority.
SQL Data Type |
Priority |
---|---|
SQL_CHAR |
0 |
SQL_UNICODE |
1 |
SQL_VARCHAR |
2 |
SQL_UNICODE_VARCHAR |
3 |
SQL_LONGVARCHAR |
4 |
SQL_UNICODE_LONGVARCHAR |
5 |
SQL_DATE |
6 |
SQL_TIME |
7 |
SQL_TIMESTAMP |
8 |
SQL_BINARY |
9 |
SQL_VARBINARY |
10 |
SQL_LONGVARBINARY |
11 |
SQL_BIT |
12 |
SQL_TINYINT |
13 |
SQL_SMALLINT |
14 |
SQL_INTEGER |
15 |
SQL_BIGINT |
16 |
SQL_DECIMAL |
17 |
SQL_NUMERIC |
18 |
SQL_REAL |
19 |
SQL_FLOAT |
20 |
SQL_DOUBLE |
21 |
SQL_QFLOAT |
22 |