Query that works not saving or parsing in Design mode

Query that works not saving or parsing in Design mode

I am trying to edit a query that works when I open it (and when used by reports).

However, when I go into Design mode and try to save it without even modifying anything, it will point to a parsing error. The error it first pointed to was a place where I had been using a "||" operator instead of "OR" because previously "OR" would not work. So I switched them. It would then display another parsing error, but without any reference location.

So I copied the query section by section into a test query to identify the problematic parts. There are 7 lines in the SELECT statement that seem to not parse. What they have in common is that they all use an IF statement. However, there are other IF statements that seem to pass the test.

I am stumped as to what is wrong.

Is the parser unstable? Is there a language module that was previously available no longer available?


/*    IF(ISNULL(m1."BROK_DESC"), IF(m1."TRD_CUR" <> 'USD', 'Foreign', 'No Broker'), m1."BROK_DESC") AS "Broker",
*/


/*    SUM(IF(m1."CL_ID" = m2."CL_ID", 1, 0)) AS "Numb Lots for Acct"
*/