Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI SQL Client ODBC

Recommendation for variant columns

  • Last UpdatedJan 04, 2023
  • 1 minute read

As long as the converted Variant column does not need to be constrained, the workaround provided, Variant as String, is sufficient. All data will be provided as strings, and visualization and reporting tools will have no problems.

When constraints must be applied to such columns, it is recommended that you create or use PI SQL Views that explicitly cast the Variant column to a native data type (such as String, Float, and so on.) When the TO_NCHAR capability is enabled, for strings, the Unicode type (String) should be used. When the TO_NCHAR capability is disabled, for strings, the ASCII type (AnsiString) should be used.

Note: The Attribute and data tables do already have native data type value columns (Value_Int, Value_Double, Value_String (Unicode), and so on).

Related Links
TitleResults for “How to create a CRG?”Also Available in