JohnFol said:
yes, something like .
Select * from tblSurveyResponse where SurveyItemID = 4 and Response = Yes
and SurveyResponseID in (Select SurveyResponseID from tblSurveyResponse
where SurveyItemID = 7 and Response = No)
I didn't see anything in Steve's criteria about the need for
SurveyResponseID, so what about just using an or conjunction with
parenthesis? That would be my first crack:
Select ResponderID, SurveyItemID, Response from tblSurveyResponse where
(SurveyItemID = 4 and Response = Yes) or (SurveyItemID = 7 and Response
= Yes)
In Oracle, database tuning tehniques suggest using UNions rather than or
conjunctions in the where criteria and I know with huge databases in
Oracle the union method does run appreciably faster. Not sure about the
same in Jet, though, but here's what I'd try with a union:
Select
ResponderID, SurveyItemID, Response from tblSurveyResponse
where
SurveyItemID = 4 and Response = Yes
UNion
Select
ResponderID, SurveyItemID, Response from tblSurveyResponse
where
SurveyItemID = 7 and Response = Yes
The first method is easy in that you can use the query builder...