这个查询在C#中给我错误“ '>'附近的语法错误我该如何解决?

问题描述:

选择StockId作为[股票ID],(ProductName)作为[产品名称],功能,总和(数量)作为[数量],价格,总和(TotalPrice)作为[总价格]来自Config,Stock其中Config.ConfigID = Stockid,Stockid,按产品名称,功能,价格总和(数量> 0)按产品名称排序,con;

SELECT StockId as [Stock ID], (ProductName) as [Product Name],Features,sum(Quantity) as [Quantity],Price,sum(TotalPrice) as [Total Price] from Config,Stock where Config.ConfigID=Stock.ConfigID group by Stockid, productname,features,price having sum(Quantity > 0) order by Productname",con;

尝试移动括号。

更改:

Try moving the bracket.
Change:
group by Stockid, productname,features,price having sum(Quantity > 0) order by Productname",con;






To

group by Stockid, productname,features,price having sum(Quantity) > 0 order by Productname",con;