[
https://issues.jboss.org/browse/TEIID-3385?page=com.atlassian.jira.plugin...
]
Juraj Duráni commented on TEIID-3385:
-------------------------------------
Yes I know that column label should be used. But I expect if I use AS clause to rename
column in the result then ResultSetMetaData should return column's label that was
declared in AS clause not original name of the column.
ResultSet rs = connection.prepareStatement("SELECT IntKey AS a FROM
mytable").executeQuery();
ResultSetMetaData md = rs.getMetaData();
String name = md.getColumnName(1);
Now the variable 'name' contains "IntKey", but I think that it should
contain "a".
ResultSetMetaData returns wrong column name after renaming (using
AS)
---------------------------------------------------------------------
Key: TEIID-3385
URL:
https://issues.jboss.org/browse/TEIID-3385
Project: Teiid
Issue Type: Bug
Affects Versions: 8.7.1
Reporter: Juraj Duráni
Assignee: Steven Hawkins
Query: SELECT IntKey AS a FROM <table>;
Issues:
- ResultSetMetaData object returns name of the column "IntKey", but it should
return "a".
- method ResultSet.getString("IntKey") thows an exception
(org.teiid.jdbc.TeiidSQLException: Column name "INTKEY" does not exist.), but
ResultSet.getString("a") returns the correct result.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)