M
Matilda
Dear Experts,
I get a "data type mismatch" error when I run this. I have checked the data
types, and am wonering if the comparison operators or the AND syntax is
wrong. Can you help please?
SELECT DISTINCT tblSubmissions.Campus, Max(tblSubmissions.SubmNo) AS
MaxOfSubmNo, IIf(([SubmExtrctEndDt]>=[PeriodEndDt1]) And
([SubmExtrctEndDt]<=[SubDL1]),1,IIf(([SubmExtrctEndDt]>=[PeriodEndDt2]) And
([SubmExtrctEndDt]<=[SubDL2]),2,"")) AS RptPeriod,
Max(tblSubmissions.SubmExtrctEndDt) AS MaxOfSubmExtrctEndDt
FROM tblSubmissions INNER JOIN tblESISDeadlineLU ON tblSubmissions.CalMnth =
tblESISDeadlineLU.CalMnthNo
GROUP BY tblSubmissions.Campus, IIf(([SubmExtrctEndDt]>=[PeriodEndDt1])and
([SubmExtrctEndDt]<=[SubDL1]),1,IIf(([SubmExtrctEndDt]>=[PeriodEndDt2]) And
([SubmExtrctEndDt]<=[SubDL2]),2,""))
ORDER BY tblSubmissions.Campus, Max(tblSubmissions.SubmNo);
Many TIAs
Matilda
I get a "data type mismatch" error when I run this. I have checked the data
types, and am wonering if the comparison operators or the AND syntax is
wrong. Can you help please?
SELECT DISTINCT tblSubmissions.Campus, Max(tblSubmissions.SubmNo) AS
MaxOfSubmNo, IIf(([SubmExtrctEndDt]>=[PeriodEndDt1]) And
([SubmExtrctEndDt]<=[SubDL1]),1,IIf(([SubmExtrctEndDt]>=[PeriodEndDt2]) And
([SubmExtrctEndDt]<=[SubDL2]),2,"")) AS RptPeriod,
Max(tblSubmissions.SubmExtrctEndDt) AS MaxOfSubmExtrctEndDt
FROM tblSubmissions INNER JOIN tblESISDeadlineLU ON tblSubmissions.CalMnth =
tblESISDeadlineLU.CalMnthNo
GROUP BY tblSubmissions.Campus, IIf(([SubmExtrctEndDt]>=[PeriodEndDt1])and
([SubmExtrctEndDt]<=[SubDL1]),1,IIf(([SubmExtrctEndDt]>=[PeriodEndDt2]) And
([SubmExtrctEndDt]<=[SubDL2]),2,""))
ORDER BY tblSubmissions.Campus, Max(tblSubmissions.SubmNo);
Many TIAs
Matilda