MySQL: Use stored procedure in SELECT statements or similar
Posted on 2010-01-08
currently, I have programmed a stored procedure that receives one argument, the id of a product, and returns 1 row x 5 columns of data for that product via an unbounded SELECT statement. Think of it as a procedure generating a "Sales Report" for a given product.
Now, I'd like to be able, by modification of that procedure or by other means, to have this Sales Report generated for many product ids that I would query for with a SELECT statement. For example, generate a table Sales Reports for all non-food merchandise or products with a sales price below 100$.
I'd like to be able to work flexibly with that stored procedure and be able to use it with SELECT statements, or similarly to achieve similar results.
I'm curious about your suggestions.
If there are further questions, I'll be happy to clarify.