M
Mo
Is there a way to write this query in a more effeciently? Can I combine
the '(SY=2006 or (SY) Is Null)' clause into a single clause instead of
having it in several places as I have done?
Thanks for any help you can give.
Mo
SELECT SY, KASE, REFNO, LAB, CSNM, TERM, TD, TM,
TY, SD, SM, MSN
FROM tblscreening
WHERE (SY=2006 or (SY) Is Null)
AND (TERM) Is Null AND (TD) Is Null AND (TM) Is Null AND (TY) Is Null
OR (SY=2006 or (SY) Is Null)
AND (MAGE) Is Null AND (MD) Is Null AND (MM) Is Null AND (MY) Is Null
OR (SY=2006 or (SY) Is Null)
AND (SD) Is Null AND (SM) Is Null
OR (SY=2006 or (SY) Is Null)
AND (GSTO) Is Null
OR (SY=2006 or (SY) Is Null)
AND (POST) Is Null
OR (SY=2006 or (SY) Is Null)
AND (MATNHS) Is Null
the '(SY=2006 or (SY) Is Null)' clause into a single clause instead of
having it in several places as I have done?
Thanks for any help you can give.
Mo
SELECT SY, KASE, REFNO, LAB, CSNM, TERM, TD, TM,
TY, SD, SM, MSN
FROM tblscreening
WHERE (SY=2006 or (SY) Is Null)
AND (TERM) Is Null AND (TD) Is Null AND (TM) Is Null AND (TY) Is Null
OR (SY=2006 or (SY) Is Null)
AND (MAGE) Is Null AND (MD) Is Null AND (MM) Is Null AND (MY) Is Null
OR (SY=2006 or (SY) Is Null)
AND (SD) Is Null AND (SM) Is Null
OR (SY=2006 or (SY) Is Null)
AND (GSTO) Is Null
OR (SY=2006 or (SY) Is Null)
AND (POST) Is Null
OR (SY=2006 or (SY) Is Null)
AND (MATNHS) Is Null