Solved

Optimizing DB n displaying

Posted on 2006-06-17
2
200 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 125 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

In this article, I show you step by step with screenshots to assist you - HOW TO: Deploy and Install the VMware vCenter Server Appliance 6.5 (VCSA 6.5), with some helpful tips along the way.
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now