Delete Qry

jeudi 19 mars 2015

Hi folks, need some help here, I am trying to run a delete qry when patient treatment is complete.



I would like the qry to run if the Date Treatment Complete field is more than 28 days old, code below.





DELETE *

FROM tblPatient

WHERE EXISTS



(SELECT *



FROM tblReferral



WHERE tblPatient.PatientID = tblReferral.PatientFK AND ([Treatment Status]="Treatment Complete" AND [Date Treatment Complete]=Date()+28));

Delete Qry

0 commentaires:

Enregistrer un commentaire

Labels