MySQL Forums
Forum List  »  Spanish

Re: Consultas sobre procedimientos almacenados..
Posted by: William Chiquito
Date: October 12, 2006 08:21AM

Juan Fernando,

Trata así:

#DECLARE v_QUERY VARCHAR (1000);
SET @v_QUERY ='SELECT * FROM CITY';
PREPARE stmt1 FROM @v_QUERY;
EXECUTE stmt1;
DEALLOCATE PREPARE stmt1;

El problema es que la instrucción PREPARE necesita una variable de usuario "@" y no una variable local.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Consultas sobre procedimientos almacenados..
2773
October 12, 2006 08:21AM


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.