Hi all, new member and first time post.
I'm currently creating a process and I'm having the strangest issue that I can't seem to explain. Essentially what I'm trying to do is update values on a table to round based on specific criteria (Monthly vs Yearly).
Here is the SQL code that works when I run this update query:
Code:
UPDATE TB_1201_SfaxCM
SET TB_1201_SfaxCM.MRR = IIf([TB_1201_SfaxCM].[Term]="Monthly",([TB_1201_SfaxCM].[DIDS]-1)*5+[TB_1201_SfaxCM].[Plan Value],([TB_1201_SfaxCM].[DIDS]-1)*4+[TB_1201_SfaxCM].[Plan Value]/12);
However, I want yearly to round to 2 decimal places. I've tried this and keep getting a syntax error:
Code:
UPDATE TB_1201_SfaxCM
SET TB_1201_SfaxCM.MRR = IIf([TB_1201_SfaxCM].[Term]="Monthly",([TB_1201_SfaxCM].[DIDS]-1)*5+[TB_1201_SfaxCM].[Plan Value],([TB_1201_SfaxCM].[DIDS]-1)*4+ROUND([TB_1201_SfaxCM].[Plan Value]/12,2);
Thanks!