db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Per Newgro <per.new...@gmx.ch>
Subject Re: Tablealias as column qualifier in resultset
Date Thu, 07 Dec 2006 07:34:37 GMT
Hi Rajesh,

> Hello Per,
>
> I have never seen any examples of using "tableName.columnName" with the
> ResultSet.getObject() method.
> My understanding   is  the ResultSet.getObject () is expected to use
> only the column names, hence using
> the table name qualifier will  not work.  Using only the column names
> should be right approach as
> you noticed (getObject("A"))
>
But this is a valid sql syntax or? Is the meaning of that, that it's not 
supported by the jdbc-spec or only by derby driver?

> For cases where the same column names appear in joins of two tables, I
> would qualify those
> columns with the respective tables in the query and  use the
> *getObject*(int columnIndex)  instead:
But this means i have to map the column index and the object field. Thats 
impossible, because the resultset order of fields depends on create table 
statement, which is externally managed from my application (in a sql script 
file). I.e. i can not guarantee the correct mapping.

Cheers
Per

Mime
View raw message