I have been unable to manipulate ACCESS to read the SQL statements below. I have been successful in the past. I have been unable to detect why ACCESS does not meet any of the conditions. (Where etc...). The code below gives me the complete contents of both the Market and Trends tables.
What could be interfering with the SQL statements meeting these conditions?
---------------------------------------------------------
select Hospital, Title, FName, LName, Street, City, State, Zip
from Market
where State IN ('NY', 'PA')
and not Hospital = 'USA Hospital'
or not Hospital = 'New Hospital'
or not Hospital = 'Feline Health'
or not Hospital = 'Memorial Hospital'
or not Hospital = 'University Hospital'
or not Hospital = 'Memory Hospital'
or not Title = 'Budget Officer'
UNION select Hospital, Title, FName, LName, Street, City, State, Zip
from Trends
where State in ('NY', 'PA')
and NOT Hospital = 'USA Hospital'
or NOT Hospital = 'New Hospital'
or NOT Hospital = 'Feline Health'
or NOT Hospital = 'Memorial Hospital'
or NOT Hospital = 'Hospital'
or NOT Hospital = 'Memory Hospital'
or NOT Title = 'Budget Officer';
----------------------------------------------------------
Thank you
What could be interfering with the SQL statements meeting these conditions?
---------------------------------------------------------
select Hospital, Title, FName, LName, Street, City, State, Zip
from Market
where State IN ('NY', 'PA')
and not Hospital = 'USA Hospital'
or not Hospital = 'New Hospital'
or not Hospital = 'Feline Health'
or not Hospital = 'Memorial Hospital'
or not Hospital = 'University Hospital'
or not Hospital = 'Memory Hospital'
or not Title = 'Budget Officer'
UNION select Hospital, Title, FName, LName, Street, City, State, Zip
from Trends
where State in ('NY', 'PA')
and NOT Hospital = 'USA Hospital'
or NOT Hospital = 'New Hospital'
or NOT Hospital = 'Feline Health'
or NOT Hospital = 'Memorial Hospital'
or NOT Hospital = 'Hospital'
or NOT Hospital = 'Memory Hospital'
or NOT Title = 'Budget Officer';
----------------------------------------------------------
Thank you