MySQL Forums
Forum List  »  Stored Procedures

Re: How to Exec variable contenting SQL statement in Procedure?
Posted by: Andrew Gilfrin
Date: March 22, 2005 02:50AM

The most obvious solution to this would be to build functions outside of MySQL which builds the select statment as a string (if your simply doing this to return dynamic results).

I assume you would have been calling these stored procedures from another language anyway so write the code in that layer rather than MySQL stored procedues. Even in a language such as PL/SQL or T-SQL there is no advantage other than a central point of storage to write a procedure in this way.

Perhaps if you told us why you want to do this then it might help give a better answer.

Andrew Gilfrin
http://www.mysqldevelopment.com

Options: ReplyQuote




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.