Thread: accessing collumn in join ResultSet

accessing collumn in join ResultSet

From
Alex Dovlecel
Date:
Hello again,

Just want to know, in order not to struggle again.

I jave a join query. Execute it, works fine, get the resultset.

The tables involved are X and Y, both of them have an Id field.

How can I access it from ResultSet? .getInt( "X.id" ) sais that there is no
field!!!

tx
dovle

Re: accessing collumn in join ResultSet

From
Dave Cramer
Date:
Alex,

You have two choices here

rename one of the columns in the select by using "as"

ie select id as yid, id as xid ...

or use column numbers.

Dave


On Mon, 2002-12-02 at 12:17, Alex Dovlecel wrote:
> Hello again,
>
> Just want to know, in order not to struggle again.
>
> I jave a join query. Execute it, works fine, get the resultset.
>
> The tables involved are X and Y, both of them have an Id field.
>
> How can I access it from ResultSet? .getInt( "X.id" ) sais that there is no
> field!!!
>
> tx
> dovle
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
--
Dave Cramer <Dave@micro-automation.net>