I have the problem with my nested cursors in MySQL.
My second cursor only advances 1 single record of the first courses and then shows me message indicating. Below is a sample of the response from my Mysql Workbeanch.
OPEN queryLegalArticleSource; queryLegalArticleSource_LOOP : LOOP -- PARSED VARS FETCH queryLegalArticleSource INTO configTypeArticleTypeTwo; -- ************************************ -- VALIDATE PROCESS noMoreRows -- ************************************ IF noMoreRowsTwo = 1 THEN CLOSE queryLegalArticleSource; LEAVE queryLegalArticleSource_LOOP; END IF; SELECT legalBodyId, companyIdSource, configTypeArticleTypeTwo, noMoreRowsTwo; END LOOP queryLegalArticleSource_LOOP; CLOSE queryLegalArticleSource;
If I comment the FETCH line
-- FETCH queryLegalArticleSource INTO configTypeArticleTypeTwo;
Get all the results, but I do not have the variable I need.
Check if any cursor was closing it before, but apparently I have everything right.
Does anyone have any idea?