Geting data from joined tables
- From: Bernd Treine <bht@xxxxxxxxxxxxx>
- Date: Sun, 22 Oct 2006 22:13:49 +1300
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
.
- Follow-Ups:
- Re: Geting data from joined tables
- From: Bill
- Re: Geting data from joined tables
- Prev by Date: Re: anyone know of an application that tells you if your odbc driver is level 1 or 2 compliant?
- Next by Date: Re: Geting data from joined tables
- Previous by thread: anyone know of an application that tells you if your odbc driver is level 1 or 2 compliant?
- Next by thread: Re: Geting data from joined tables
- Index(es):
Relevant Pages
|
|