What is wrong with this VBscript in the field calculator?
if [ColumnB] > 0 then [ColumnC] = [ColumnA] / [ColumnB] endif
Each time I receive this syntax error message:
Error 000539: SyntaxError: invalid syntax (expression, line 1) Failed to execute
All 3 columns are the double field type, although they vary in precision and scale. I have tried converting the columns to float type and doing the same expression. I received the same error messages.
For the first line (starting with 'if'), the script is left-justified. For the second line (starting with '[ColumnC]) I included four spaces before the script. In the codeblock on the field calculator the equation does extend into the third line (and is left justified) simply because the actual name I use for !ColumnB! is longer.