Good afternoon!
I am successfully creating the following cursor:
declare v_cursor cursor for
select idCliente, max(dataVenda) from Cliente
left join Venda on idCliente = cliente_idCliente
group by idCliente;
But when I run the command fetch
I get the following error:
Error code 1329, SQL state 02000: No data - zero rows fetched, selected, or processed
Apparently he charges that select
did not return any tuple to the cursor. However, when I run select
isolated, it returns data :
Can anyone tell me why this happens?
Is there a way around this?
Thank you!