每个月我都会运行以下查询
select A.a,
from A
inner join B on .....
where B.RemDate between '2013/09/01' and '2013/10/01'
我想将它添加为作业(来自 SQL Server 代理)以在每月的第二天运行。是否可以自动更改
B.RemDate between '2013/09/01' and '2013/10/01'
至
B.RemDate between '1stday_of_previous_month' and '1st_day_of_current_month'