This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Regarding join statement? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Regarding join statement?" Watch "Regarding join statement?" New topic
Author

Regarding join statement?

vijay mahendra
Ranch Hand

Joined: Jan 01, 2007
Posts: 51
Hi one and all,

I need somedata in my project that was related to 2 tables.
But problem was ,we have 2 tables , one is codes and other is name.

but i need to display on browser names corresponding to code as tree structure.
but i wrote a join query ,it returns all the codes and names .

and i tried add those details to tree structure. But it displays as all the codes in table as parent nodes and all the names as child nodes.
But i need to display as child names those are corresponding to code as parent only .

Hot to write this join . ??? in resultset, we should get only names related to code.
plzzz give suggestions if any.
Satish SN
Ranch Hand

Joined: Apr 19, 2005
Posts: 70
Hi Vijay,

Your requirement is not clear from what you have written.

Basically the joins in SQL are used to retrieve data from multiple tables based on common condition.

In your case the browser code and names are stored in two tables that is a bad database design they way you have explained in your problem.

if you could put couple of records from both the tables i can help further in solving your problem


Satish SN<br />SCJP 1.4 & SCWCD 1.4
 
wood burning stoves
 
subject: Regarding join statement?
 
Similar Threads
XML and JTree
Sorting JTree Nodes alphabetically
JTree, adding and removing nodes contained in a master tree
Get parent node dynamically
JTree and XML