MySQL Forums
Forum List  »  Italian

Re: il cursore non interpreta la sintassi
Posted by: Luana Pozzo
Date: December 11, 2008 06:31AM

Michele Abbondanza Wrote:
-------------------------------------------------------
> la tua stored function non funziona perchè:
> ERROR 1336 (0A000): Dynamic SQL is not allowed in
> stored function or trigger
>
> io però sinceramente ho creato una stored così:
> DROP PROCEDURE IF EXISTS `db`.`executeQuery`$$
> CREATE DEFINER=`root`@`localhost` PROCEDURE
> `executeQuery`(queryT VARCHAR(255))
> BEGIN
> set @sql_text:=queryT;
> PREPARE stmt1 FROM @sql_text;
> EXECUTE stmt1;
> DEALLOCATE PREPARE stmt1;
> END$$
>
> che mi esegue il codice che gli mando come
> parametro di ingresso..
> però non funziona con i trigger..

Ciao,
Il problema resta perchè il codice da te scritto funziona ma se lo vuoi fare per l'apertura di un cursore non va bene, non si puo utilizzare il PREPARE o sbaglio?

Options: ReplyQuote


Subject
Views
Written By
Posted
6211
November 26, 2008 05:29PM
3424
November 28, 2008 05:07AM
Re: il cursore non interpreta la sintassi
3404
December 11, 2008 06:31AM
3382
December 01, 2008 09:58AM


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.