JDBC Metadata GetColumnName Truncating when Using an Alias (Doc ID 290165.1)

Last updated on AUGUST 03, 2016

Applies to:

JDBC - Version: 9.2.0.4
This problem can occur on any platform.

Symptoms

You get metadata using JDBC from the following table:

TESTDATE(col1 DATE, HOST_MESSAGE_DATETIME DATE)

The developer executes the following query: "select to_char(col1, 'yyyymmdd') ,
to_char(HOST_MESSAGE_DATETIME,'hh24miss') from testdate" from a Java
application and uses the following method: "getColumnName()" in order to get
back the column names used in that query.

The result of the "getColumnName()" was the following:
Metadata information...
Index => 1
Column name => TO_CHAR(COL1,YYYYMMDD)
Index => 2
Column name => TO_CHAR(HOST_MESSAGE_DATETIME, [****]
Closing rset...
Closing stmt...
Closing conn...
End of program

The second column name was truncated(see [****])

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