I've got two tables Company and Person.
The Table Person includes the column ReportA and ReportB
Persons are linked to their Company's with the field: person.comp_id
So each Company has one or more Persons linked.
I would like to select a list of all company's where none of the persons has the report "xyz" neither in the column ReportA and ReportB
Some Company's have persons that uses "xyz" others don't use them. I need all the company's where none of the linked persons uses the report "xyz".
This was my "Solution", but this will also give you company's where one ore more Persons use the Report "xyz".
from Person inner join Company on person.Id = company.Id
where (reportA not like '%xyz%' or reportA is null)
and (reportb not like '%xyz%' or reportb is null)
MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…