Data Mismatch Humdinger!! (1 Viewer)

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!
 

RainLover

VIP From a land downunder
Local time
Today, 20:24
Joined
Jan 5, 2009
Messages
5,041
What causes the Data Mismatch Error
 

WayneRyan

AWF VIP
Local time
Today, 11:24
Joined
Nov 19, 2002
Messages
7,122
FireStorm,

As a guess, I'd say that the Abs function is "indirectly" converting some of
your field values from Null to a 0.

Wayne
 

Users who are viewing this thread

Top Bottom