Variant columns
- Last UpdatedSep 29, 2022
- 1 minute read
- PI System
- PI SQL Client ODBC 2021
- Developer
Columns that hold data of different data types are exposed as SQL_VARIANT in PI SQL Client ODBC. For example, this is true for most Value columns. The Oracle Database Gateway for ODBC (DG4ODBC) does not support this data type. The Oracle behavior for unknown data types is such that these columns are treated as nonexistent, meaning you can neither retrieve nor constrain such columns.
PI SQL Client ODBC offers a workaround for the problem and allows you to expose SQL_VARIANT as a Unicode string instead. While this allows you to include these columns in the list, constraining these columns has several issues, which are described in the following sections.