I have this query that has gotten quite messy. i know what i want to say, but havent been able to tie it together.
i would like to query a few tables in the
EPPSGlobalProd and LogItProd databases that have relationships and select records that match any one of the criteria (should i have used 'or') or tear this thing down and rebuild
SELECT DISTINCT p.person_id,
p.last_name,
p.first_name,
o.name
FROM security_user_office_assignment s, office o, person p INNERJOIN clean_cut_experience c ON p.person_id = c.person_id
INNER JOIN cri_experience r ON p.person_id = r.person_id
INNER JOIN desorption_tech_experience d ON p.person_id = d.person_id
INNER JOIN dwm_wellsite_experience w ON p.person_id = w.person_id
INNER JOIN fluids_experience f ON p.person_id = f.person_id
INNER JOIN pressure_control_equipment_experience s ON p.person_id = s.person_id
INNER JOIN rdf_experience x ON p.person_id = x.person_id
INNER JOIN speedwell_experience n ON p.person_id = n.person_id
where p.adguid = s.adguid and s.office_id = o.office_id
order by o.name
thank you