MySQL Forums
Forum List  »  Spanish

¿Convertir procedimiento Firebird a MySQL?
Posted by: José Vicente Zahonero
Date: September 30, 2019 05:08AM

Hola tengo el siguiente procedimiento en Firebird:
CREATE OR ALTER PROCEDURE DIAS_SIN RETURNS (
"RESULT" INTEGER
)
AS
DECLARE VARIABLE AUX INTEGER;
BEGIN
AUX = 0;
RESULT = 0;
FOR
SELECT max(DATEDIFF(DAY FROM DT2.FECHA TO DT1.FECHA))
FROM DATOS DT1, DATOS DT2
WHERE DT1.SALIDA_NUM = DT2.SALIDA_NUM + 1
INTO :AUX
DO
IF(AUX > RESULT) THEN RESULT = AUX;
SUSPEND;
END
Estoy intentando convertirlo a MySQL me atasco en el SELECT. ¿Puede alguien echarme una mano? Gracias.

Options: ReplyQuote


Subject
Views
Written By
Posted
¿Convertir procedimiento Firebird a MySQL?
626
September 30, 2019 05:08AM


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.