select TradeNo , SUM(Qty) as BalQty from Tbl_Shr_Data group by TradeNo
select TradeNo ,SUM(Qty) as BalQty from Tbl_Shr_Data where BalQty > 0 group by TradeNo
SELECT TradeNo, SUM(Qty) as BalQty FROM Tbl_Shr_Data GROUP BY TradeNo HAVING SUM(Qty) > 0
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)