Query Question

T

trainsteve

I have a table that contains the list of people's names and team leaders:
For Example:

Member Name Team Leader
Bob Johnson Sue Hall
Sue Hall Nick Jones
Jack Nichols Sue Hall
Mary Smith Sue Hall

What I need help with is what to i need to put in a query that return all
members of Sue Hall's Team, in which the 3 members (Bob, Jack, Mary) are
returned as well as the team leader Sue
 
O

Ofer Cohen

Something like

Select * From TableName Where [Member Name] = [Please select a name] Or
[Team Leader] =[Please select a name]

The user will be prompt with the message [Please select a name]
 
K

KARL DEWEY

Is this what you are looking for ---
SELECT trainsteve.[Member Name], trainsteve_1.[Team Leader]
FROM trainsteve LEFT JOIN trainsteve AS trainsteve_1 ON trainsteve.[Member
Name] = trainsteve_1.[Team Leader]
GROUP BY trainsteve.[Member Name], trainsteve_1.[Team Leader];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top