Comments - Two days in, and I still can't find the cause of this 1064 error.
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
You have several errors in the actual code.
Missing SET before done
category and leaf_match are not defined
insert into report values (false, category, select sum(amount) from WFChkData where regexp_instr(description, leaf_regexp));is an invalid statement. it could be rewritten as an insert select like:
insert into report select false, category, sum(amount) from WFChkData where regexp_instr(description, leaf_regexp);You also spelled delimiter wrong on the final line.