Hi,
I am developing one website in which i have around 21 table in my database out of which 8 are master tables and rest are secondry tables. I want the data stored in some columns of master table to be displayed as drop down menu in my secondry table. few Column names are same in secondry table and master table. how do i do that???

by learning all about master-detail forms and queries, and learning why you should not use Java code from JSP.

Hi,
I am developing one website in which i have around 21 table in my database out of which 8 are master tables and rest are secondry tables. I want the data stored in some columns of master table to be displayed as drop down menu in my secondry table. few Column names are same in secondry table and master table. how do i do that???

Have you tried joining two tables with a sql statement? I hope this can help
http://www.adp-gmbh.ch/ora/sql/outer_join.html

I think he is asking how to display the column names in dropdown..
If thats the case use java code in your jsp(Though not the best practice).
Create a set with all the values and then parse it to display in the dropdown.. So as you told you dont want repeated data you can use something like this...

Set abcd = new Hashset();
abcd.add("kaushik"); / / these values you can fetch from db
abcd.add("1234");
abcd.add("kaushik");

so if my value repeats also i wont get repeated value in the result set.. and at the end the set will have only two values.. kaushik and 1234..
Hope that help..
Also remember if you are doing in jsp itself then generic type wont work and throw exceptions afterwards while accessing..

This article has been dead for over six months. Start a new discussion instead.