cursor bulk collect [message #305185] |
Mon, 10 March 2008 01:21 |
ravikumar_kapala
Messages: 1 Registered: March 2008 Location: VISAKHAPATNAM
|
Junior Member |
|
|
DECLARE
--TYPE TAB_TYPE IS TABLE OF EMP%ROWTYPE;
--T TAB_TYPE;
CURSOR C IS SELECT * FROM EMP;
TYPE TAB_TYPE IS TABLE OF C%ROWTYPE;
T TAB_TYPE;
BEGIN
OPEN C;
LOOP
FETCH C BULK COLLECT INTO T;
EXIT WHEN C%NOTFOUND;
END LOOP;
CLOSE C;
END;
Dear friend, the above code is not working in 9i. but the same is working in 10g relese 2. what is the difference between EMP%ROWTYPE; and C%ROWTYPE (c is of same as emp structure).
Seeking your help
Thanks in advance.
Ravi kumar kapala
|
|
|
Re: cursor bulk collect [message #305565 is a reply to message #305185] |
Tue, 11 March 2008 05:11 |
dr.s.raghunathan
Messages: 540 Registered: February 2008
|
Senior Member |
|
|
hi
from my experience, it is always good on differentiating table
name from cursor name.
you have remarked first two lines. for that what sort of
cursor you have created.
yours
dr.s.raghunathan
|
|
|
Re: cursor bulk collect [message #327527 is a reply to message #305185] |
Mon, 16 June 2008 14:28 |
rdebruyn
Messages: 17 Registered: June 2008 Location: Ottawa
|
Junior Member |
|
|
DECLARE
TYPE TAB_TYPE IS TABLE OF EMP%ROWTYPE INDEX BY BINARY_INTEGER;
T TAB_TYPE;
CURSOR C IS SELECT * FROM EMP;
BEGIN
OPEN C;
FETCH C BULK COLLECT INTO T;
CLOSE C;
END;
|
|
|