【发布时间】:2020-04-28 00:14:57
【问题描述】:
【问题讨论】:
【问题讨论】:
这是你想要的吗?
select t.*
from t
where name <> 'i' or
date2 <= dateadd(month, +6, date1 - datepart(month, date1) -1))
我不太确定你的情况应该是什么,但这就是你的问题。
根据文中的逻辑:
select t.*
from t
where name <> 'i' or
date2 <= dateadd(month, +6, date1)
【讨论】: