Reputation: 149
I am receiving the error message "The data types real and smallint are incompatible in the '^' operator" for the following sequence:
SELECT b.[CUSIP NUMBER],
b.[ORIGINAL BALANCE],
b.[ORIGINAL WA MATURITY],
b. [PASS THRU RATE],
b.[ORIGINAL BALANCE] * ( ( b.[PASS THRU RATE] / 12 ) * ( 1 + ( b.[PASS THRU RATE] / 12 )^b.[ORIGINAL WA MATURITY] ) ) / ( 1 + ( b.[PASS THRU RATE] / 12 )^b.[ORIGINAL WA MATURITY] )
FROM DBO.mbs012013 a,
dbo.mbs022013 b
WHERE a.[CUSIP NUMBER] = b.[CUSIP NUMBER]
Is there another way to set up the exponent so that I do not receive this error message? Or is there a way to declare the "Original WA Maturity" column as a numeric variable?
For reference: A cusip number is a serial number, original wa maturity is given in months, pass thru rate is given as a percentage (5.5%).
Upvotes: 2
Views: 74
Reputation: 453338
You need to use the POWER
function for exponents. ^
is Bitwise Exclusive OR
Upvotes: 4