ALTER TABLE Potential ADD NextReplyDate datetime
GO

ALTER TABLE Sending ADD ErrorNum int
GO

ALTER TABLE SendLog ADD ErrorNum int
GO

update Search set [Content]='
Select 
convert(varchar(10),Payment.DateAndTime,120)  as 日期,
sum(Payment.PayMoney) as 金额 
from Payment
where Payment.PostSchoolID in ( {@SchoolID:校区} ) 
and Payment.DateAndTime >= {@StartDate:开始日期} 
and Payment.DateAndTime <= {@EndDate:结束日期} 
and Payment.PaymentTypeID in (1,2) 
group by convert(varchar(10),Payment.DateAndTime,120) 
' where SearchID = 2
GO

Update DBInfo set DateAndTime='2010-11-04'
GO