Geting data from joined tables



Hi all,

What would be the best method of getting data from a Resultset that
has multiple joined tables?

Example

select
t1.*,
t2.*
from
table1 t1,
table1 t2
where ....

The issue is that in SQL, I can distinguish between fields of t1 and
t2 although they have the same name. In JDBC I get an error.

I can't write:

Resultset.getString("t1.field1")
and
Resultset.getString("t2.field1")
Resultset just cannot distinguish the 2 fields by the "t1." qualifier.

I know I can work around with
Resultset.getString(columnIndex).

But that does not answer my question.

Many thanks

Bernard
.



Relevant Pages

  • Re: Performance problem in sql ce
    ... Resultset seems to be work. ... SqlCeResultSet rs = CeCommand.ExecuteResultSet; ... even with the amount of data you have. ... I am very disappointed with the sql queries performance in sql ce. ...
    (microsoft.public.sqlserver.ce)
  • Re: Performance problem in sql ce
    ... Resultset seems to be work. ... SqlCeResultSet rs = CeCommand.ExecuteResultSet; ... even with the amount of data you have. ... I am very disappointed with the sql queries performance in sql ce. ...
    (microsoft.public.sqlserver.ce)
  • Re: ADO
    ... whether the resultSet is actually ... ADOCommand has overloaded version of Execute: ... DDL statement or an SQL query returning a result set. ... but only single SQL statements? ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: FTS query performance on SQL 2005
    ... I believe I have applied all optimizations that I've been able ... believe this is because the full resultset is returned from the FTE back to ... SQL Server, and then the count is taken on that. ...
    (microsoft.public.sqlserver.fulltext)
  • Re: FTS query performance on SQL 2005
    ... I believe I have applied all optimizations that I've been able ... believe this is because the full resultset is returned from the FTE back to ... SQL Server, and then the count is taken on that. ...
    (microsoft.public.sqlserver.fulltext)