Tema: Ref CURSOR
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/08/2016, 07:58
maurimono
 
Fecha de Ingreso: octubre-2004
Ubicación: Santiago de Chile
Mensajes: 504
Antigüedad: 19 años, 6 meses
Puntos: 0
Respuesta: Ref CURSOR

Hola, así lo estoy haciendo:
Código SQL:
Ver original
  1. DECLARE
  2.   P_BRANCH NUMBER;
  3.   P_FECHAINI VARCHAR2(32767);
  4.   P_NUMEROOPE NUMBER;
  5.   P_ERRCOD NUMBER;
  6.   P_ERRMSG VARCHAR2(32767);
  7.   --C_Retorno  Pkg_Seguridad.cursorgenerico;
  8. -------------------------Variables del cursor-----------------------
  9. numero_mdr                  varchar2(100);--number;
  10. numero_murex                varchar2(100);
  11. branch                      varchar2(100);
  12. dia_contrato                varchar2(100);
  13. mes_contrato                VARCHAR2(100);
  14. agno_contrato               VARCHAR2(100);
  15. nombre_estructura           VARCHAR2(30);
  16. operador                    VARCHAR2(50);
  17. nro_mdr_estructura          varchar2(100);--number;
  18. cantidad_moneda_referencia  VARCHAR2(50);
  19. Comprador                   VARCHAR2(50);
  20. Vendedor                    VARCHAR2(50);
  21. modalidad_cumplimiento      varchar2(100);--number;
  22. fecha_vencimiento           varchar2(100);--date;
  23. fecha_pago                  varchar2(100);--date;
  24. strike_1                     VARCHAR2(50);
  25. strike_2                    VARCHAR2(50);
  26. subyacente                  VARCHAR2(100);
  27. fax_branch                  VARCHAR2(100);
  28. fono_branch                 VARCHAR2(100);
  29.  
  30.  
  31. BEGIN
  32.   P_BRANCH := 20010.4;
  33.   P_FECHAINI := NULL;
  34.   P_NUMEROOPE := 16058.24;
  35.   P_ERRCOD := NULL;
  36.   P_ERRMSG := NULL;
  37.   C_RETORNO := NULL;  --Modify the code to initialize this parameter
  38.  
  39.   CHI_CON.P_FWDASIA_FAXCONFIR ( P_BRANCH, P_FECHAINI, P_NUMEROOPE, P_ERRCOD, P_ERRMSG, C_RETORNO );
  40.  
  41.   --OPEN <subst>;
  42.   OPEN C_RETORNO;
  43.   LOOP
  44.      FETCH C_RETORNO INTO  numero_mdr,numero_murex,branch,dia_contrato,mes_contrato,agno_contrato,nombre_estructura,operador,nro_mdr_estructura,
  45.                            cantidad_moneda_referencia,Comprador,Vendedor,modalidad_cumplimiento,
  46.                            fecha_vencimiento,fecha_pago,strike_1,strike_2,subyacente,fax_branch,fono_branch;
  47.      EXIT WHEN C_RETORNO%NOTFOUND;
  48.     DBMS_OUTPUT.PUT_LINE('I got here:' || numero_mdr);    
  49.   END LOOP;
  50.   close C_RETORNO;
  51.   COMMIT;
  52. END;

[/HTML]


Saludos y gracias por tu ayuda
__________________
Dios es mas grande que tu problema :-)

Última edición por gnzsoloyo; 19/08/2016 a las 12:07