I have a process I'm dealing with that seems a little abnormal, at least in a MySQL context.
I have a temp table of unknown size. It consists of only a single column, called ID.
I am using this column of IDs to input a value to a stored procedure.
It basically goes like this:
SET @ID_var = (SELECT ID FROM temp_pidn);
CALL some_stored_proc(@ID_var);
My system works fine, but only if the temp table has one column and one row.
I'm trying to scale this up: what if the temp table has 2, 3, or n rows. I would like to call some_stored_proc
2, 3, or n times, all in a row.
In my mind, I see the need to iterate down a column, in a loop-like manner, calling a stored procedure in series. I feel like this could be pretty straightforward in Python or (especially) R, but in MySQL world, I can't figure out how to do this.
Thanks for your time.