F
Fred
I am getting a "Missing Operator" error in the third line
of the SQL code, below ("IIf(Left(Security_INF.CUSIP,4)
=CASH,999991AY,Security_INF.CUSIP) AS Alias, " & _). I am
not sure what is causing this. Can anyone offer any help?
Thanks!
DoCmd.RunSQL "SELECT ASRF.Price_Date, ASRF.Account_ID,
Security_INF.CUSIP, " & _
"IIf(Left(Security_INF.CUSIP,4)
=CASH,999991AY,Security_INF.CUSIP) AS Alias, " & _
"IIf([Alias]<>999991AY,security_inf.Coupon,0) AS
Secs_Coupon, " & _
"IIf([Alias]=999991AY,Security_Price_DTL.YTW,0) AS
Cash_Coupon, " & _
"IIf([Sector_ID]<>7,[Market_Value],0) AS Securities, IIf
([Sector_ID]=7," & _
"[Original_Face]*[Contract_Size],0) AS Futures, IIf
([Secs_Coupon]=0," & _
"[Cash_Coupon]*[Current_Face],[Secs_Coupon]*
[Current_Face]) AS Yld_Num" & _
"FROM (Security_INF LEFT JOIN Security_Price_DTL ON
Security_INF.CUSIP = Security_Price_DTL.CUSIP)" & _
"LEFT JOIN Account_Security_RF ON Security_INF.CUSIP =
Account_Security_RF.CUSIP"
of the SQL code, below ("IIf(Left(Security_INF.CUSIP,4)
=CASH,999991AY,Security_INF.CUSIP) AS Alias, " & _). I am
not sure what is causing this. Can anyone offer any help?
Thanks!
DoCmd.RunSQL "SELECT ASRF.Price_Date, ASRF.Account_ID,
Security_INF.CUSIP, " & _
"IIf(Left(Security_INF.CUSIP,4)
=CASH,999991AY,Security_INF.CUSIP) AS Alias, " & _
"IIf([Alias]<>999991AY,security_inf.Coupon,0) AS
Secs_Coupon, " & _
"IIf([Alias]=999991AY,Security_Price_DTL.YTW,0) AS
Cash_Coupon, " & _
"IIf([Sector_ID]<>7,[Market_Value],0) AS Securities, IIf
([Sector_ID]=7," & _
"[Original_Face]*[Contract_Size],0) AS Futures, IIf
([Secs_Coupon]=0," & _
"[Cash_Coupon]*[Current_Face],[Secs_Coupon]*
[Current_Face]) AS Yld_Num" & _
"FROM (Security_INF LEFT JOIN Security_Price_DTL ON
Security_INF.CUSIP = Security_Price_DTL.CUSIP)" & _
"LEFT JOIN Account_Security_RF ON Security_INF.CUSIP =
Account_Security_RF.CUSIP"