
November 24th, 2012, 06:42 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 3
Time spent in forums: 42 m 6 sec
Reputation Power: 0
|
|
|
Join Problem
I am attempting to solve an SQL quiz out of a self-teaching book, and am running into trouble. I have a table for property information, staff, and branch.
Display the property number, complete address, and property type of properties that are handled by staff who work in the West branch. Assume that the branch number of the West branch is not known.
I've tried this:
SELECT rp_propertyno, rp_street, rp_city, rp_state, rp_zipcode, rp_Type
FROM rentproperty, staff, branch
WHERE st_staffno IN (SELECT st_staffNo
FROM Staff WHERE br_branchname = (SELECT br_branchname FROM Branch WHERE br_branchname = 'west'));
But I am not sure what I am missing, any thoughts?
|