标签:update ast tom last char store set select customer
1. ---判断今天日期和指定日期相等
update store set Status =1 where CONVERT(varchar(12) ,opendate, 105 )= CONVERT(varchar(12) , getdate(), 105 ) and Status=0;
---判断两者的时间差为两年
update customer set enable=0 where DATEDIFF(d, s.LastOrderDate,getdate() )>=730
select * from customer as s where DATEDIFF(d, s.LastOrderDate,getdate() )>=730
标签:update ast tom last char store set select customer
原文地址:http://www.cnblogs.com/soundcode/p/6210866.html