Here Is my SQL:
Code:
SELECT Accounts.ClientID, Accounts.ProductID, Accounts.MonthlyDate, MonthEnd.InvestmentID, MonthEnd.AdjClose AS LastMTM, [NEEDED FORMULA] AS [Beg Position], Accounts.TradePositionX AS [Add/Sub Posn],
Accounts.TradePriceX AS [Add/Sub Price], Accounts.BrokerageFee, MonthEnd.AdjClose AS MTMPrice, Accounts.XRate, [Formula1] AS [Fee], [LastMTM]*[Beg Position] AS [Asset Value Beg],
[Formula2] AS [Assets Add/Sub], ([Beg Position]+[Add/Sub Posn])*[MTMPrice] AS EOMAssetValue, [EOMAssetValue]-[Assets Add/Sub]-[Asset Value Beg] AS [AssetsInc/Dec]
FROM MonthEnd INNER JOIN Accounts ON MonthEnd.MonthlyDate = Accounts.MonthlyDate
WHERE (((MonthEnd.InvestmentID)=3));
I have tried a bunch of ways but cannot figure out how to fit it in the sql,
I have never worked with sqls before, I have just done enough VB, where i can write basic things, and kind of understand it. My syntax is brutal.
The bolded is where i need that formula to take place.
Thanks for the help,