From: JTurner on
If I have this query, I get the "missing right parenthesis" error:

SELECT RM.BL_ID, RM.FL_ID, RM.RM_ID, RM.AREA, RM.COUNT_EM, DP.NAME,
RM.DP_ID, DV.NAME, RM.DV_ID, RM.RM_CAT, RM.RM_STD, RM.RM_TYPE, RM.RM_USE,
RM.OPTION1, RMSTD.COST_OF_SPACE,
IIF(RM.RM_STD="LOCKER",RMSTD.COST_OF_SPACE,RM.AREA*RMSTD.COST_OF_SPACE)
FROM AFM.DP DP, AFM.DV DV, AFM.RM RM, AFM.RMSTD RMSTD
WHERE RM.DV_ID = DV.DV_ID AND RM.DP_ID = DP.DP_ID AND DP.DV_ID = DV.DV_ID
AND RM.RM_STD = RMSTD.RM_STD

If I write it this way, I get "Incorrect Column Expression":

SELECT RM.BL_ID, RM.FL_ID, RM.RM_ID, RM.AREA, RM.COUNT_EM, DP.NAME,
RM.DP_ID, DV.NAME, RM.DV_ID, RM.RM_CAT, RM.RM_STD, RM.RM_TYPE, RM.RM_USE,
RM.OPTION1, RMSTD.COST_OF_SPACE,
IIF([RM].[RM_STD]="LOCKER",[RMSTD].[COST_OF_SPACE],[RM].[AREA]*[RMSTD].[COST_OF_SPACE])
FROM AFM.DP DP, AFM.DV DV, AFM.RM RM, AFM.RMSTD RMSTD
WHERE RM.DV_ID = DV.DV_ID AND RM.DP_ID = DP.DP_ID AND DP.DV_ID = DV.DV_ID
AND RM.RM_STD = RMSTD.RM_STD

And if I write it this way, I get an "ORA-00936: missing expression" error:

SELECT RM.BL_ID, RM.FL_ID, RM.RM_ID, RM.AREA, RM.COUNT_EM, DP.NAME,
RM.DP_ID, DV.NAME, RM.DV_ID, RM.RM_CAT, RM.RM_STD, RM.RM_TYPE, RM.RM_USE,
RM.OPTION1, RMSTD.COST_OF_SPACE,
IIF([RM.RM_STD]="LOCKER",[RMSTD.COST_OF_SPACE],[RM.AREA]*[RMSTD.COST_OF_SPACE])
FROM AFM.DP DP, AFM.DV DV, AFM.RM RM, AFM.RMSTD RMSTD
WHERE RM.DV_ID = DV.DV_ID AND RM.DP_ID = DP.DP_ID AND DP.DV_ID = DV.DV_ID
AND RM.RM_STD = RMSTD.RM_STD
From: JTurner on
Also, for Rik_UK, I don't know how to "declare" a field. In my Excel search,
I found that I can't select something "AS" and that you would caption the
expression in the options (and turn off field names). So I'm probably missing
something...