Jump to content

passing an array as input parameters to a stored procedure?


Juarez

Recommended Posts

Hi

I will be receiving a text file with the  values below on a regular basis. I'm creating a form where the final aim is to import each row  of these values and use each row of values as the parameters of a stored procedure in MYSQL. There is only one stored procedure so I will run the stored procedure the required number of times with each row of values and output the results as one result set.

 

My question is about the best method to achive this before I start. Would it be best to import the values to an array and then use the array as the input parameter for the stored procedure or import them to a temp table or something?

 

 

 

 

chr start end
chr22 50478251 50481750
chr22 50313501 50331250
chr22 50543751 50557250
chr22 50637751 50645250
chr22 50904001 50929000
 

 

 

 

thanks

I believe you can only pass string variables when calling a stored procedure. Since you would need to pass a bunch of different variables instead, I would lean toward the temp table solution. You probably won't even need to call the procedure multiple times if you already have the data in a table.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.