Re: column name not found - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: column name not found
Date
Msg-id 1046012829.614.5.camel@inspiron.cramers
Whole thread Raw
In response to column name not found  ("G.L. Grobe" <gary@grobe.net>)
List pgsql-jdbc
Gary,

Postgres doesn't send the table name with the data so you will have to
do

either getInt( columnNumber ) or rename one of them to

nodeid as in

select id from nodes as nodeid ... etc.

also note postgres will return NodeId as nodeid.

Dave
On Sat, 2003-02-22 at 18:59, G.L. Grobe wrote:
> I have a query line like ...
>
>     SELECT * FROM Nodes, Accounts WHERE Nodes.name = 'dyn0011' AND
> Nodes.id = Accounts.node_id AND Accounts.name = 'dude'
>
> After I get my resultsets, I do a rs.getInt("Nodes.id"), but then I get
> the following error ...
>
> 17:52:35,693 ERROR [ConfigAccountBean] The column name Nodes.id not
> found.
>
> My problem is that both the nodes and accounts tables have an 'id'
> column, so thats why I look for "Nodes.id" in the result set.
>
> Any help much appreciated.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
--
Dave Cramer <Dave@micro-automation.net>


pgsql-jdbc by date:

Previous
From: "G.L. Grobe"
Date:
Subject: column name not found
Next
From: Vernon Wu
Date:
Subject: Re: I can't insert the chinese words.