Enable TO_NCHAR capability
- Last UpdatedJan 04, 2023
- 1 minute read
- PI System
- PI SQL Client ODBC 2021
- Developer
SQL statements are translated and data types are mapped according to capabilities. Capabilities tell Heterogeneous Services about the limitations of the non-Oracle system (such as what types of SQL statements are supported) and how to map Oracle data types and SQL expressions to their non-Oracle system equivalents.
One capability that is disabled but is needed for PI SQL Client ODBC is the capability. When disabled, comparison of strings with columns of type or will be handled by Oracle in the post-processing part.
Note: See Unicode data handling for limitations and workarounds if you cannot or do not want to enable the capability for DG4ODBC.
-
To enable the capability, connect to SQL*Plus as if connecting to your regular database, using the sysdba account.
-
At the SQL prompt, load the stored procedure called enable_to_nchar.sql that is provided in the samples directory, PIHOME\SQL\SQL Client\ODBC\Samples\Oracle.
Examples
The following example shows the enable_to_nchar.sql stored procedure:
SQL*Plus: Release 18.0.0.0.0 - Production on Tue May 7 12:26:40 2019
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Enter user-name: system
Enter password:
Last Successful login time: Tue May 07 2019 12:22:30 +02:00
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 – Production Version 18.3.0.0.0
SQL> @"c:/program files/pipc/sql/sql client/odbc/samples/oracle/enable_to_nchar.sql";
TO_NCHAR capability is enabled
PL/SQL procedure successfully completed.
SQL>