Flere felter i en select sætning
Jeg har følgende procedure:*****************************************************
SELECT ind - ud AS mybalance
FROM (SELECT (SELECT SUM(IOPalletQuantity) AS Expr1
FROM dbo.transactions
WHERE (IOTekst = 'ind') AND (customerID = 105) AND(IOPalletType = N'EUR')) AS ind,
(SELECT SUM(IOPalletQuantity) AS Expr2
FROM dbo.transactions AS transactions_1
WHERE (IOTekst = 'ud') AND (customerID = 105) AND (IOPalletType = N'EUR')) AS ud) AS derivedtbl_1
******************************************************
Jeg vil gerne have flere felter med fra tabellen, således at man kan se hvor mange paller der er pr vare..
Så select ser nogenlunde sådan her ud
select customerID, ItemID, location, ind-ud
from osv...