I have a problem. I can't use 'exists' as it is not available in the particular software I am using to write this thing (MS Access). I can get around this problem by using a passthru query and using exists but have two trainees that can't. Why do the two queries below return the same results when one is looking for is null and the other is looking for is not null. (dsSurveyId is primary index on DS_SURVEY table and swCaseId is the primary index on the SW_CASE table)
SELECT SW_CASE.swCaseId
FROM SW_CASE , DS_SURVEY
where SW_CASE.swCaseId *= DS_SURVEY.swCaseId
having DS_SURVEY.dsSurveyId IS NOT NULL
SELECT SW_CASE.swCaseId
FROM SW_CASE , DS_SURVEY
where SW_CASE.swCaseId *= DS_SURVEY.swCaseId
having DS_SURVEY.dsSurveyId IS NULL
Trisha
padinka@yahoo.com
SELECT SW_CASE.swCaseId
FROM SW_CASE , DS_SURVEY
where SW_CASE.swCaseId *= DS_SURVEY.swCaseId
having DS_SURVEY.dsSurveyId IS NOT NULL
SELECT SW_CASE.swCaseId
FROM SW_CASE , DS_SURVEY
where SW_CASE.swCaseId *= DS_SURVEY.swCaseId
having DS_SURVEY.dsSurveyId IS NULL
Trisha
padinka@yahoo.com