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

PI SQL Client ODBC

Enable TO_NCHAR capability

  • Last UpdatedJan 04, 2023
  • 1 minute read

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 TO_NCHAR capability. When disabled, comparison of strings with columns of type SQL_WCHAR or SQL_WVARCHAR 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 TO_NCHAR capability for DG4ODBC.

  1. To enable the TO_NCHAR capability, connect to SQL*Plus as if connecting to your regular database, using the sysdba account.

  2. 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>

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