I'm a little confused about what you are trying to do. Could you post some SQL queries and possibly the table structure to clarify this? If you don't want records of the 1-many variety you could do a group by clause which gives you single records based on combinations of multiple records.
1. Take data using Joins statement. 2. Instatiate a String as nameStr, and two ArrayList objects as phonesList & carsList.
3. Now as you get data from the query, for the first row of the resultset: 3.a) Set value of "Name" column to nameStr. 3.b) Set value of "phone" column to phonesList 3.c) Set value of "car" column to carsList.
4. For subsequent rows from the resultset: 4.a) If value for "phone" column is already present in phonesList, ignore. Else, add it to the list. 4.b) If value for "car" column is already present in carsList, ignore. Else, add it to the list.
5. After the entire resultset is processed, you will get name, phonesList, carsList.
Cheers,<br />Hemanth...<br />(When opportunity doesn't knock, build a door.)
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop