Click here to Skip to main content
15,920,636 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Have these tables

membNum membFNme membLNme
1234 Bob Zoo
1235 Big Mar
1236 Luke Chies
1237 Zama Long
1238 Zain Zoie

hikeDate TransTyp hikeLFNme
30-02-2008 Foot MountEver
01-07-2010 Bus CreepDan
13-05-2005 Truck Walk


membNum hikeDate task
1234 01-07-2010 Team leader
1236 30-02-2008 Medical Officer
1238 13-05-2005 None

I need an SQL statement that will help me pull out all the members that have never participated in a hike.
Posted

1 solution

Try something like,

SELECT * FROM   MemberTable
LEFT OUTER JOIN HikeTable
ON              MEMBERTABLE.MemberID = HIKETABLE.MemberID 
WHERE           HIKETABLE.MemberID IS NULL
 
Share this answer
 
Comments
allaparaclatus 17-Aug-10 3:00am    
Thanks you.
Arun Jacob 17-Aug-10 3:27am    
If it worked, mark it as answer so that others can see it solved.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900