Using Cast Function On Columns Coming From Ms Sql Server Over DG4MSQL V11.2 Generates Error (Doc ID 1364192.1)

Last updated on JANUARY 18, 2017

Applies to:

Oracle Database Gateway for SQL Server - Version 11.2.0.2 and later
Information in this document applies to any platform.

Symptoms


SELECT CAST("size" AS NUMBER) FROM <table>@<gateway_db_link>
generates:
"[Oracle][ODBC SQL Server Native Wire Protocol driver][Microsoft SQL Server] Type NUMBER is not a defined system type. {HY000, NativeErr = 243}"
Similar error for other data types used in CAST. Using TO_CHAR works. It seems that the CAST function is being passed to MS SQL (is a valid function in MS SQL as well) but SQL Server doesn't recognize the Oracle specific NUMBER data type.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms