Error when trying to Declare a Cursor
I am getting a syntax error with the below code but can't figure out why. Anyone know why when trying to Declare a variable or cursor it doesn't work? Create TEMPORARY TABLE Foo ( MyDate datetime not null , Amount Decimal(12,2) ) Engine=Memory; DECLARE bDone INT DEFAULT false; DECLARE fme CURSOR FOR SELECT `Period Start`,…