I have the following cases where I would like to 1. Determine if a feature has a lower elevation than another and is on the same line feature. If it is then call it 'dwn_cross'. 2. If a feature has a lower elevation than another, isn't on the same feature line, and the the azimuths of the first feature are within 120 degrees of the second feature then it is also 'dwn_cross'.
CASE
WHEN ("pipe_elev1" > "rd_elev1" AND "p_LNRFTRD" = "LNRFTRD") THEN 'dwn_cross'
WHEN "pipe_elev1" > "rd_elev1" AND "p_LNRFTRD" != "LNRFTRD" AND "p_azi" >= "rd_azi" - 120 AND "p_azi" <= "rd_azi" + 120 AND "Distance" = minimum("Distance","pipecr_no") THEN 'dwn_cross'
END
I get the following 'expression invalid' error:
Parser Errors: syntax error, unexpected NAME syntax error, unexpected QUOTED_COLUMN_REF, expecting $end syntax error, unexpected NAME, expecting $end syntax error, unexpected QUOTED_COLUMN_REF, expecting $end syntax error, unexpected NAME, expecting $end syntax error, unexpected QUOTED_COLUMN_REF, expecting $end syntax error, unexpected NAME, expecting $end syntax error, unexpected QUOTED_COLUMN_REF, expecting $end syntax error, unexpected NAME, expecting $end syntax error, unexpected QUOTED_COLUMN_REF, expecting $end
Can't figure out what is wrong.