-
1. Re: alias AS
shawkins Mar 22, 2013 7:30 PM (in response to jane_lj)> The column name displayed in the result is still uwi, not aaa.
I assume you mean from the Teiid client. In the resultset metadata there is both a column name and a column label. With JDBC4 it was standardized that the column name should refer to the actual column when possible. The column label is probably what you want instead, which will always refer to the alias if one is given.
Steve
-
2. Re: alias AS
jane_lj Mar 26, 2013 2:44 PM (in response to shawkins)Thank you, Steve.
I'm not doing from Teiid client code.
I'm using a third party tool "SQuirreL" which can let me connect to my VDB and do "SELECT uwi AS aaa FROM table1".
So from what you said, my understanding is I don't need to do anything for alias "AS" in my translator, right? Just want to make sure my translator is not the one make the alian not work.
-
3. Re: alias AS
shawkins Mar 26, 2013 2:54 PM (in response to jane_lj)> I'm using a third party tool "SQuirreL"
Which is accessing Teiid through the Teiid client.
> my understanding is I don't need to do anything for alias "AS" in my translator, right?
There is nothing that you need to do relative to user query aliases from your translator correct.
> Just want to make sure my translator is not the one make the alian not work.
This goes back to the difference between whether you (or SQuirreL) is pulling ResultSetMetadata.getColumnName or getColumnLabel - see also http://docs.oracle.com/javase/6/docs/api/java/sql/ResultSetMetaData.html#getColumnLabel%28int%29
-
4. Re: alias AS
jane_lj Mar 28, 2013 10:51 AM (in response to shawkins)Thank you very much, Steven.