MySQL Forums
Forum List  »  Spanish

Como me desplazo en un cursor
Posted by: Sergio Zavala
Date: August 29, 2006 05:26PM

Estoy iniciandome en el manejo de mySQL, me tiene facinado.

realice un cursor en un store procudere
pero no encuentro como mover el cursor a voluntad a un nĂ·umero de registro determinado o como me ubico en un registro dado un indice...

muestro un fragmento del codigo


SET I = 10;
OPEN cur1;
REPEAT
/* como muevo el curosr al registro I*/
FETCH cur1 INTO M_RFC;
INSERT INTO SERGIO.SALIDA_DOMICILIOS (CVE, CALLE, NO_EXTERIOR, NO_INTERIOR)
SELECT CVE, CALLE, NO_EXTERIOR, NO_INTERIOR FROM DARIO.CONTRIBUYENTE
WHERE CVE = M_CVE COLLATE latin1_general_ci;
SET I = I - 1;
UNTIL (I > 0) END REPEAT;


saludos

Options: ReplyQuote


Subject
Views
Written By
Posted
Como me desplazo en un cursor
6185
August 29, 2006 05:26PM
2904
October 12, 2006 09:23AM


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.