Solved

get data from multiple tables

Posted on 2011-03-10
4
390 Views
Last Modified: 2012-05-11
I have two tables
a. manager
b. team

manager table has manager_id,manager_name

team table is the table which contains team member which reports to a manager in manager table.
Team table has 3 columns, manager_id, Team_member_name, Team_member_address

I need to display a result set with column Manager_name, Team_member_address.

Please help
0
Comment
Question by:dojjol
4 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 167 total points
ID: 35096577
I would look at a redesign and self-join.

Create an 'employee' table then have manager_id reference the emp_id.  There are a tone of links on this type of design.

Based on what you have (assuming manager_name is in the manager table):
select manager_name, address from
manager, team
where manager.name=team.manager_name
0
 
LVL 15

Assisted Solution

by:derekkromm
derekkromm earned 167 total points
ID: 35096635
select m.manager_name, t.team_member_address from
manager m
inner join team t
on m.manager_id = t.manager_id
0
 
LVL 24

Assisted Solution

by:jimyX
jimyX earned 166 total points
ID: 35096653
select m.Manager_name, t.Team_member_address from manager m, team t where m.manager_id = t.manager_id;
0
 

Author Closing Comment

by:dojjol
ID: 35129949
not a solution, I was looking for
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

705 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

20 Experts available now in Live!

Get 1:1 Help Now