Запрос выполняется, но выход не приходит?
я выполняю sql-запрос, а затем вывод не приходит...
Что я уже пробовал:
;WITH CTE0 as ( select Salesorder.Orderno,SUM(OrderDetail.orderqty) as orderqty from OrderDetail inner join Salesorder on Salesorder.OrderNO=OrderDetail.OrderNO where Salesorder.Status='Open' group by Salesorder.Orderno ),cte as (select Salesorder.Orderno,sum(Probale.Prdqty) as Produce from Probale inner join Salesorder on Probale.orderno= Salesorder.Orderno where Salesorder.Status='Open' group by Salesorder.Orderno) (select orderqty,Produce,(orderqty-Produce) as Pending From cte1 where orderqty+Produce+Pending<>0 group by cte1.orderqty,cte1.Produce,cte1.Pending)