The following table defines the compatibility of data types
for comparisons. In some cases, columns can be mapped, but cannot
be used as Match Key columns. For example, if you compare source data
type Char to source data type Numeric, the data types are compatible,
but the pairing cannot be specified as a Match Key.
Source Data Type |
Char (1) |
Numeric |
Boolean |
Date/Time (2) |
Interval |
Char (1) |
Yes (9) |
Yes (4) |
Yes (4, 8) |
No |
No |
Numeric |
Yes (4) |
Yes |
Yes (4, 7) |
No |
No |
Boolean |
Yes (4, 8) |
Yes (4, 7) |
Yes |
No |
No |
Date/Time (2) |
No |
No |
No |
Yes (3, 5) |
No |
Interval |
No |
No |
No |
No |
Yes (6) |
Note: - Includes Char, VarChar, NChar, NVarChar, Binary,
VarBinary. You cannot compare multi-byte or Unicode character data
to binary or single-byte character data.
- Includes Date, Time, DateTime, Timestamp, Timestamp
with Time Zone, Timestamp with Local Time Zone.
- It is recommended that you compare Oracle Timestamp
with Time Zone columns to Timestamp with Time Zone columns only, and
Timestamp with Local Time Zone columns to Timestamp with Local Time
Zone columns only. Comparison to columns of different data types may
produce unexpected results due to Oracle assumptions for storing and
retrieving this data.
- Pairing cannot be specified as a Match Key column.
- Comparison is valid as long as both columns have
the same high-order component. For example, a DB2® Timestamp may be compared with an Informix® DateTime column only
when the Informix column
includes a ‘year' component.
- YearMonth interval columns can be compared to YearMonth
interval columns only. DayTime or DaySecond interval columns can be
compared to DayTime or DaySecond interval columns only.
- In Numeric/Boolean comparisons, when Numeric value
is 0, then Boolean value is False. When Numeric value is anything
other than 0, then Boolean value is True.
- In Char/Boolean comparisons, when Char value starts
with ‘T', ‘t', ‘Y', 'y', or ‘1', Boolean
value is True. When Char value starts with ‘F', ‘f', ‘N', 'n',
‘0', Boolean value is False.
- Comparisons of binary with multi-byte or Unicode
data are not valid.