Oracle - insertar registro en tabla

 
Vista:

insertar registro en tabla

Publicado por Viry (10 intervenciones) el 23/01/2007 00:25:41
ACABO DE HACER ESTE PEQUEÑO BLOQUE PERO ME MARCA UNOS ERRORES:

ORA-06550: line 3, column 4:
PL/SQL: ORA-00933: SQL command not properly ended
ORA-06550: line 2, column 21:
PL/SQL: SQL Statement ignored
ORA-06550: line 6, column 8:
PLS-00103: Encountered the symbol ";" when expecting one of the following:

begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a b

Lo que quiero q realize es la operacion de (SYSDATE-PC.FDFECHASURT) e insertarlo en una tabla pero no me queda alquien podria axiliarme porfa... Gracias

DECLARE
CURSOR prueba IS SELECT TRUNC(TRUNC(SYSDATE-PC.FDFECHASURT)/7) AS DIAS FROM RCREDITO.PEDIDOS_CREDITO PC
SEMMADUREZ DIEAHUER.BURBD_CARTERA_SELECCIONABLE.FISEMMADUREZ%TYPE;
BEGIN
OPEN prueba;
LOOP;
FETCH prueba INTO SEMMADUREZ;
INSERT INTO DIEAHUER.BURBD_CARTERA_SELECCIONABLE (FISEMMADUREZ) VALUES (SEMMADUREZ);
COMMIT;
END LOOP;
CLOSE prueba;
END;
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:insertar registro en tabla

Publicado por Rodolfo Reyes (445 intervenciones) el 23/01/2007 17:31:41
Te falta un ; despues de PC al hacer el cursor.

Y creo que primero tienes que declarar las variables y tipos, despues puedes poner la declaración de cursores.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:insertar registro en tabla

Publicado por NICOLAS (1 intervención) el 11/03/2010 14:37:29
TE FALTA EL ; DESPUES DE DECLARAR EL CURSOR.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar