How can we combine the output of 2 cursors? + oracle
Thanks n Advance
Combine the output of 2 cursors
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Arulraj5 reputationPosted Nov 1, 2009, 9:13 PM EST
ALTER TYPE SAMPLE_TYPE AS OBJECT ( COL1
NUMBER(6, 0), COL2 VARCHAR2(30));
CREATE TYPE SAMPLE_TABLETYPE AS
TABLE OF SAMPLE_TYPE;
(
p_restcode IN REST_INFO.REST_CODE%type,
p_attdt IN DAILYATTENDANCELOG.CHECKTIME%type
)
RETURN SAMPLE_TABLETYPE PIPELINED AS
r_mstabletype SAMPLE_TYPE;
BEGIN
FOR r_count IN (SELECT A.ID,A.NAME,B.ADDRESS,B.CITY FROM TABLE1 A,TABLE 2 B WHERE A.ID=B.ID) LOOP
r_mstabletype:=DAILYATTCOL(r_count.ID,r_count.NAME);
PIPE ROW(r_mstabletype);
END LOOP;
RETURN;
END ;