This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Nested Record sets and Joins Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Nested Record sets and Joins" Watch "Nested Record sets and Joins" New topic
Author

Nested Record sets and Joins

Reggie McDougal
Ranch Hand

Joined: Sep 27, 2004
Posts: 69
Can some one give me a hand with my code.

I have 2 tables

Product Table
phonepricevalue table

I want to get the product name from the product table store it in an ArrayList and then pull the data from the phonepricevalue that corresponds to the product name and store that in the same Array.

Now what is the best way to create a join in my ArrayObject

1. Do I have sperate method method 1 get the name and ID create the Array and pass in into the next method to pull the data for each plan.

2. Do it with SQL some how that will let me jion the data and store it in the Array in one operation.

I'm using Oracle 8i weblogic 8.1

Cheers

Reg




You can never drink too much
Reggie McDougal
Ranch Hand

Joined: Sep 27, 2004
Posts: 69
this is all I needed to do


[ January 10, 2005: Message edited by: Jeanne Boyarsky ]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30076
    
149

Reggie,
Thanks for posting the solution!


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Nested Record sets and Joins
 
Similar Threads
Multiple preparedStatements 1 Connection
Using a Bean for Retrieving Results Sets - Best Approach
retrieving individual elements from an ArrayList
No ResultSet set was produced
Are there any problems using the same statement for multiple queries?