expression 转换为数据类型 datetime 时出现算术溢出错误。
select top 12 a.fid,a.fname,a.SEName,a.ShortDescription,a.DefaultUrl,
isnull(b.StockQuantity,0) StockQuantity,b.MinStockQuantity,b.Price,b.OldPrice,c.fqgPrice,
c.fstime,c.fetime,(cast(c.fetime as datetime)-getdate()) as dd,datediff(second,getdate(),convert(nvarchar(50),c.fetime,120)) as SecondSpan
,convert(nvarchar(50),c.fetime,120)
from dbo.Product a
left join dbo.ProductVariant b on a.fid = b.ProductID left join ProductAttribute c on
a.fid=c.ProductID
where a.Published = 1 and a.xed = 1 and b.IsShowIndex=1 and c.IsRobBy=1 and
cast(c.fstime as datetime)<getdate() and convert(nvarchar(50),c.fetime,120)>getdate()
order by cast(a.ModifiedOn as datetime) desc
SQL
补充:.NET技术 , Web Services