我有以下查询:
SELECT QuoteReference, CreatedDate, StartDate, EndDate, Operation, OccurredAt, PerformedBy, FieldName, OldValue, NewValue
FROM Quotes, Audit
WHERE Quotes.ID = Audit.RowId
AND PaymentReference is not null
AND Audit.OccurredAt > Quotes.CompletedDate
AND Quotes.CreatedDate between '2010-04-01 11:00:00.027' AND '2010-07-30 11:39:22.027'
and TableName = 'QUOTE' OR TableName = 'Quotes'
ORDER BY Audit.OccurredAt desc
尽管尝试了很多事情,但在“quotes.createddate between ...”行上,我无法过滤结果集以包含创建日期介于这些时间(2010 年 4 月 1 日至 2012 年 7 月 30 日)之间的记录。我怎样才能做到这一点?