Re: accessing collumn in join ResultSet

From: Dave Cramer <Dave(at)micro-automation(dot)net>
To: Alex Dovlecel <dovle(at)kbs(dot)twi(dot)tudelft(dot)nl>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: accessing collumn in join ResultSet
Date: 2002-12-03 11:03:33
Message-ID: 1038913413.23240.72.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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(at)micro-automation(dot)net>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Felipe Schnack 2002-12-04 13:10:28 UTF encoding error
Previous Message Han 2002-12-03 03:37:06 Re: Exception: No primary keys?