• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Regarding join statement?

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic