这是什么数据库的代码
select c.ExternalID as AccountExternalID,
cast(c.ExternalID as varchar(10)) + Cast(YEAR(f.InvoiceDate) as varchar(4)) + Cast(MONTH(f.InvoiceDate) as varchar(2)) as ExternalID,
Cast(MONTH(f.InvoiceDate) as varchar(2)) + '/1/' + Cast(YEAR(f.InvoiceDate) as varchar(4)) as SalesDate,
YEAR(f.InvoiceDate) as SalesYear, MONTH(f.InvoiceDate) as SalesMonth, SUM(f.ExtSales) as Sales, SUM(f.GrossMargin) as GrossMargin
from Flash f
join SFDCAccountIDs c on f.CustID = c.CustID
where YEAR(f.InvoiceDate) = YEAR(getdate())
and c.ExternalID is not null
Group by c.ExternalID, YEAR(f.InvoiceDate), MONTH(f.InvoiceDate)
Order by c.ExternalID, YEAR(f.InvoiceDate), MONTH(f.InvoiceDate)
------解决方案--------------------SQL Server的
------解决方案--------------------
经SQL SERVER 2005语法分析,提示:命令已成功完成。
------解决方案--------------------看起来是MSSQL的