How to get all records where a joined column contains some value (at least once) Forgive my horrible description in the title. I have a table called timesheet which has one record per week per employee. There are many rows in timecard_entries for a timesheet. A timesheet can have multiple approvers because each timecard entry is connected to a project. What I need is to get all timecard entries on a timesheet that contains an approver. 

Here is my query currently:

SELECT a.timesheetid AS sheet, b.timecardid AS entry, f.ControlsLead AS approver
FROM timesheet a
LEFT JOIN timecard_entries b ON a.timesheetid = b.sheet
LEFT JOIN sub_projects c ON b.subprojectid = c.subprojectid
LEFT JOIN tblCustomerPOItems d ON c.lineid = d.CUSTOMERPOITEMID
LEFT JOIN tblCustomerPOs e ON d.CustomerPO = e.CUSTOMERPOID
LEFT JOIN tblProjects f ON e.ProjectNum = f.PROJECTNOID


This returns:

sheet    entry    approver
1        68       1
1        69       3
1        70       3
1        71       3
1        72       3
1        73       1
1        74       1
2        97       1
2        98       1


So, in this case, if I want records with approver 3 I am looking to get all entries with timesheet = 1 because it contains at least one record with approver = 3

Required output:

sheet    entry    approver
1        68       1
1        69       3
1        70       3
1        71       3
1        72       3
1        73       1
1        74       1


Using the logic from the accepted answer the new query is:

SELECT a.timesheetid AS sheet, b.timecardid AS entry
FROM timesheet a
LEFT JOIN timecard_entries b ON a.timesheetid = b.sheet
WHERE a.timesheetid IN
(
    SELECT z.timesheetid FROM timesheet z
    LEFT JOIN timecard_entries y ON z.timesheetid = y.sheet
    LEFT JOIN sub_projects x ON y.subprojectid = x.subprojectid
    LEFT JOIN tblCustomerPOItems w ON x.lineid = w.CUSTOMERPOITEMID
    LEFT JOIN tblCustomerPOs u ON w.CustomerPO = u.CUSTOMERPOID
    LEFT JOIN tblProjects t ON u.ProjectNum = t.PROJECTNOID 
    WHERE t.ControlsLead = 3
)
you can use a subquery in your where clause.

e.g.

SELECT sheet,
       entry,
       approver
FROM timesheet
WHERE sheet =
(
    SELECT sheet FROM timesheet WHERE approver = 3
);