field name problems with joins in Oracle JDBC thin driver
Joined: Oct 09, 2001
Hi All, can I do this in Oracle JDBC: SELECT project.*, lead.*, second.* FROM project, person lead, person second WHERE project.lead_person_id = lead.id AND project.second_person_id = second.id And then somehow use ResultSet.getString("lead.name") and get the field value using the column name rather than the column index? Ideally I want to be able to avoid naming the fields in the SELECT clause, only in the getString() I played around all afternoon trying to get something like this to work, checking out the Oracle docs and so on, but I can't manage it. I want to encapsulate the field names in specific classes in my database access objects. It seems though I have to give the field names aliases in the SELECT clause - is that so? Is there no way I can do it with table aliases? Thanks for any tips, Adam
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
Joined: Feb 20, 2001
It's typically much faster to use the column indexes as opposed to column names.
James Carman, President<br />Carman Consulting, Inc.