MySQL Forums
Forum List  »  Stored Procedures

Calling PROCEDURE on SELECT output
Posted by: kryz kryz
Date: April 18, 2008 09:28AM

Hi,

i have a stored procedure `myproc` taking 1 parameter integer.
i have a query printing everybody's id from a table: SELECT id FROM users;

i would like to call `myproc` on every id returned by the SELECT.

I read mysql select documentation: http://dev.mysql.com/doc/refman/5.0/en/select.html, it talks about passing select output to procedure.
If I get it right I should have to write a query looking like this:

* SELECT id FROM users PROCEDURE myproc(id); *

but it tells me myproc is an unknown procedure... even though a call maproc(1) works just fine.

what am I doing wrong?

Thanx in advance for you help :)
+



Edited 1 time(s). Last edit at 04/18/2008 09:29AM by kryz kryz.

Options: ReplyQuote


Subject
Views
Written By
Posted
Calling PROCEDURE on SELECT output
6789
April 18, 2008 09:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.