-- Error: A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations.
DECLARE @x SMALLINT
SELECT
AL1.Type,
AL3.Name,
AL3.Guid,
@x = (Sum (ISNULL(AL2."Quantity Added", 0)) - Sum (ISNULL(AL2."Quantity Taken",0)))
FROM dbo.Inv_Details AL1...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.