Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and exploring the core foundations for app libraries.
SELECT [Location Code], SUM(Quantity)
FROM dbo.[CQC$Item Ledger Entry]
WHERE [Item No_] = '10438'
AND [Location Code] IN ('10', '20', '90', '95')
GROUP BY [Location Code]
Do more with
SELECT
[10], [20], [90], [95]
FROM
(SELECT [Location Code], SUM(Quantity)
FROM dbo.[CQC$Item Ledger Entry]) AS SourceTable
PIVOT (
SUM(Quantity)
FOR [Location Code] IN ('10', '20', '90', '95') ) AS PivotTable
Premium Content
You need an Expert Office subscription to comment.Start Free Trial