Java UcanAccess中的DELETE函数引发奇怪的异常

Java UcanAccess中的DELETE函数引发奇怪的异常,java,sql,ucanaccess,Java,Sql,Ucanaccess,自从Java 1.8中消除了JDBC桥(我们仍在哀悼)并转向UcanAccess以来,我一直在调试过去从未给我带来任何问题的SQL代码。。其中一项声明是: DELETE TreatmentRecords.DateGiven, TreatmentRecords.TimeGiven, SInformation.Surname, SInformation.FirstNames, TreatmentRecords.Diagnosis, TreatmentRecords.* FROM SInformati

自从Java 1.8中消除了JDBC桥(我们仍在哀悼)并转向UcanAccess以来,我一直在调试过去从未给我带来任何问题的SQL代码。。其中一项声明是:

DELETE TreatmentRecords.DateGiven, TreatmentRecords.TimeGiven, SInformation.Surname, SInformation.FirstNames, TreatmentRecords.Diagnosis, TreatmentRecords.*
FROM SInformation INNER JOIN TreatmentRecords ON SInformation.SID = TreatmentRecords.SID
WHERE (((TreatmentRecords.DateGiven)=#2015-03-07#) AND ((TreatmentRecords.TimeGiven)='17;16') AND ((SInformation.Surname)='Doe') AND ((SInformation.FirstNames)='John') AND ((TreatmentRecords.Diagnosis)='Headache'));
在Access中执行时,我绝对不会遇到任何错误或问题。 但是,Ucancess引发以下异常:

net.ucanaccess.jdbc.UcanaccessSQLException: unexpected token: TREATMENTRECORDS required: FROM

如果您有任何关于为什么的想法,我们将不胜感激

这是一个非标准的SQL delete语句,ucanaccess不支持它,即使Jet引擎支持它。没什么奇怪的。 因此,您必须使用标准SQL进行此操作

编辑 e、 例如,类似这样的情况(我没有添加所有条件):


你能告诉我上面的标准SQL语句是什么样子的吗?请看上面;-)
   DELETE FROM TreatmentRecords tr WHERE 
    tr.DateGiven=#2015-03-07# AND EXISTS 
(SELECT * FROM SInformation s WHERE s.SID=tr.SID AND  s.Surname='Doe')