SELECT DISTINCT TMPLAB.ID, TMPREG.DOB, TMPINF.LIVRSKB ;
FROM TMPREG, TMPINF, TMPLAB ;
WHERE TMPLAB.ID = TMPREG.ID ;
AND (TMPINF.LIVRSKB = .F. AND TMPINF.HEPBVACC = .F. AND TMPLAB.AHBS = 'P' AND TMPLAB.AHBC = 'P') ;
AND (TMPLAB.LABIMPDATE >= M.DATE1 AND TMPLAB.LABIMPDATE <= M.DATE2) ;
UNION ;
SELECT DISTINCT TMPLAB.ID, TMPREG.DOB, TMPINF.LIVRSKB ;
FROM TMPREG, TMPINF, TMPLAB ;
WHERE TMPLAB.ID = TMPREG.ID ;
AND (TMPINF.LIVRSKC = .F. AND AND TMPLAB.AHCV = 'P' AND TMPLAB.AHCVQ > 3) ;
AND (TMPLAB.LABIMPDATE >= M.DATE1 AND TMPLAB.LABIMPDATE <= M.DATE2) ;
INTO TABLE C:\HESDRA\HEPC
You have two AND statements together on the third to last line.
Stephen Kuhn
Prism Network, Inc.
System Developer
At last we can reveal ourselves to the Jedi.
At last we will have revenge.
-Darth Maul