?
Solved

Optimizing DB n displaying

Posted on 2006-06-17
2
Medium Priority
?
211 Views
Last Modified: 2010-04-01
hi experts,

I'hv 2 tables 'Menu' &'Sun-Menu' how can I use single stmt or one query to run both n display rs.

Menu Fields :
M-ID      MenuName
Sub-Menu Fields:
S-ID     M-ID      Sub-MenuName

I want o/t 2b:

ABC
   abc-1
   abc-2
XYZ
   xyz-1
   xyz-2
...

Thx
PH

0
Comment
Question by:princehyderabad
2 Comments
 
LVL 4

Accepted Solution

by:
pablomorales earned 500 total points
ID: 16934863
You could use the following query to generate your menu

Select m.M-ID,m.MenuName,s.S-ID, s.Sub-MenuName from Menu m, Sub-Menu s where m.M-ID = s.M-ID order by m.M-ID, s.S-ID

You would also need an if statement to detect when the M-ID changes.


0
 

Author Comment

by:princehyderabad
ID: 16936257
Can anyone post the JSP code as well to check for M-ID changes....
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Social messanging services like WhatsApp and Facebook can help businesses in ways that many owners don't even imagine, giving new opportunities to connect with customers. Discover some of the most innovative things they can do for your company.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question