Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/08/2008, 09:06
OscarH
 
Fecha de Ingreso: junio-2008
Ubicación: D.F.
Mensajes: 62
Antigüedad: 15 años, 10 meses
Puntos: 1
Respuesta: Procedimiento sencillo

Que Tal,


No se si entendí bien o no,

si es esto lo que necesitas


CREATE OR REPLACE PROCEDURE nombre_proc(pVal1 NUMBER, pVal2 NUMBER) IS
BEGIN

-- y mandar los datos ya sea a un insert o a un ref cursor o a un into
--insert into ....
-- open refcursor for...

select ntd.TYPE_ID_NRC,ntd.Trigger_level,ntd.Product_line _id,ntd.Trans_sign
--into ...
from NRC_TRANS_DESCR ntd, descriptions d, rate_nrc rn, PART_CHARACT_VALUE pcv
where ntd.TYPE_ID_NRC in ( pVal1,pVal2)
and ntd.TYPE_ID_NRC=rn.TYPE_ID_NRC
and rn.TYPE_ID_NRC=pcv.PART_ID
and d.DESCRIPTION_CODE=ntd.description_code


END;
/


o simplemente algo como esto


select ntd.TYPE_ID_NRC,ntd.Trigger_level,ntd.Product_line _id,ntd.Trans_sign
from NRC_TRANS_DESCR ntd, descriptions d, rate_nrc rn, PART_CHARACT_VALUE pcv
where ntd.TYPE_ID_NRC in ( &val1,&val2)
and ntd.TYPE_ID_NRC=rn.TYPE_ID_NRC
and rn.TYPE_ID_NRC=pcv.PART_ID
and d.DESCRIPTION_CODE=ntd.description_code

Saludos.