firestorm998
Registered User.
- Local time
- Today, 03:24
- Joined
- Nov 28, 2006
- Messages
- 24
I've been running an append query for some time now with a field using the below expression successfully.
Gross Base Equity Notional-Short: IIf([Long/Short]="Short",IIf([Product Type]="OTCEquityOption",Abs([Delta Position Value USD]),IIf([Product Type]="ETOEquity",Abs([Delta Position Value USD]),IIf([Product Type]="FutureEquityIndex",Abs([NotionalPar]*[Price]*[Fx Rate]*[Future Contract size]),IIf([Product Type]="EquityLinkedSwap",Abs([Fx Rate]*[Quantity]*[pmunderlying_spot]),IIf([Product Type]="BondConvertible" And [strategy]="CBS",Abs([MARKET_VALUE_CLEAN(BASE)]),IIf([Product Type]="BondConvertible" And [strategy]<>"CBS",Abs([Delta Position Value USD]),IIf([product type]="CFDDirectional",Abs([NotionalPar]*[Price]*[Fx Rate]),IIf([contract size]=1,Abs([MARKET_VALUE_CLEAN(BASE)])))))))))
The powers that be have decided that the calcuations I am doing to make several fields Absolute should infact remain negative/positive. So I've gone through the expression removing the 'ABS' references. Strangely I can remove from certain fields within this expression successfully but when I remove from others I get Data Mismatch errors. The fields giving the issue are just standard long integers(positive/negative) appending to a field of the same format.
Removing the ABS is going to make some figures that were positive, negative;but I don't see why that would create a data mismatch errror?
I think I can fix it by multilplying the whole expression by '*-1' but the error is annoying me!
Gross Base Equity Notional-Short: IIf([Long/Short]="Short",IIf([Product Type]="OTCEquityOption",Abs([Delta Position Value USD]),IIf([Product Type]="ETOEquity",Abs([Delta Position Value USD]),IIf([Product Type]="FutureEquityIndex",Abs([NotionalPar]*[Price]*[Fx Rate]*[Future Contract size]),IIf([Product Type]="EquityLinkedSwap",Abs([Fx Rate]*[Quantity]*[pmunderlying_spot]),IIf([Product Type]="BondConvertible" And [strategy]="CBS",Abs([MARKET_VALUE_CLEAN(BASE)]),IIf([Product Type]="BondConvertible" And [strategy]<>"CBS",Abs([Delta Position Value USD]),IIf([product type]="CFDDirectional",Abs([NotionalPar]*[Price]*[Fx Rate]),IIf([contract size]=1,Abs([MARKET_VALUE_CLEAN(BASE)])))))))))
The powers that be have decided that the calcuations I am doing to make several fields Absolute should infact remain negative/positive. So I've gone through the expression removing the 'ABS' references. Strangely I can remove from certain fields within this expression successfully but when I remove from others I get Data Mismatch errors. The fields giving the issue are just standard long integers(positive/negative) appending to a field of the same format.
Removing the ABS is going to make some figures that were positive, negative;but I don't see why that would create a data mismatch errror?
I think I can fix it by multilplying the whole expression by '*-1' but the error is annoying me!