日期:2014-05-18 浏览次数:20544 次
select distinct 物料名称= FItemID,金额=sum(FAmount) from vwICBill_1 convert(varchar(10),FDate,120) like '2009-01%' group by FItemId try
------解决方案--------------------
select distinct 物料名称= FItemID,金额=sum(FAmount) from vwICBill_1 where FDate like '[2009-01]%' group by FItemId
试试
------解决方案--------------------
select distinct 物料名称= FItemID,金额=sum(FAmount) from vwICBill_1 where convert(varchar(7),FDate,120)='2009-01' group by FItemId