这个查询在C#中给我错误“ '>'附近的语法错误我该如何解决? [英] This Query Give Me Error In C # That " Syntax Error Near '>' How Can I Solve It ?

查看:89
本文介绍了这个查询在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;


这篇关于这个查询在C#中给我错误“ '>'附近的语法错误我该如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆