Sorry if the title is confusing
I have a query that is something like this:
Declare cursor xy is select yr from calendar; BEGIN for rec1 in xy loop in