cursors [message #661831] |
Tue, 04 April 2017 00:03 |
|
jay12
Messages: 2 Registered: April 2017
|
Junior Member |
|
|
CURSOR lcur_shipment_noorder(p_archive_trans_order_shipment NUMBER) IS
SELECT archive_obj_id_type(shipment_id),
archive_obj_id_type(to_contact_info_id),
archive_obj_id_type(from_contact_info_id),
archive_obj_id_type(NULL)
FROM shipment sh, stg_archive.yfs_ship_tmp yfs
WHERE trim(sh.orig_shipment_id)=trim(yfs.shipment_no)
AND sh.shipment_id NOT IN (SELECT shipment_id
FROM shipment_line
WHERE order_line_id IN (SELECT id
FROM order_line
)
)
AND shipment_status_id IN (SHIPMENT_DELIVERED, SHIPMENT_CANCELLED);
Is it possible to fetch records from multiple tables using cursors? Please someone clarify my doubt.
|
|
|
|
|
Re: cursors [message #662040 is a reply to message #661835] |
Fri, 14 April 2017 15:49 |
Bill B
Messages: 1971 Registered: December 2004
|
Senior Member |
|
|
Also as long as the columns are the same data type you can do something like
for pnt in (select col1,col2,col3
from my_table1
union all
select cola,colb,colc
from my_other_table) loop
|
|
|