Comments - Two days in, and I still can't find the cause of this 1064 error.

7 years, 2 months ago Brian Evans

You have several errors in the actual code.

done = false;

Missing SET before done

fetch cur_leafs into category, leaf_match;

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.

 
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.