Hi there, I have a column in a table "Dev_current_5yr_2D" that I want to update based on a couple of conditions. I have been trying write an IF THEN ELSE type statement in MapBasic but get an error saying "Unrecognised command:if." I am guessing I am missing something (or multiple things) at the start.
The table I am trying to work with is "Dev_current_5yr_2D", the column/field I am trying to update is "Manhole_Performance", and I am trying to do it based on conditions met using the fields "DEPNOD", "ground_level", and "Surcharge" (all of which are in the table "Dev_current_5yr_2D"). So the command I have written is as follows:
If Dev_current_5yr_2D.DEPNOD > Dev_current_5yr_2D.ground_level then
Dev_current_5yr_2D.Manhole_Performance = 3
elseif Dev_current_5yr_2D.Surcharge < 0 then
Dev_current_5yr_2D.Manhole_Performance = 2
else
Dev_current_5yr_2D.Manhole_Performance = 1
endif
i would be grateful for any assistance as I have 16 tables to update and it would be awesome to not have to go via Excel. Thanks heaps.
kind regards
Ali