Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » cursor bulk collect (9i)
cursor bulk collect [message #305185] Mon, 10 March 2008 01:21 Go to next message
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 Go to previous messageGo to next message
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 Go to previous message
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;
Previous Topic: temporary ascii files
Next Topic: pass a cookie from one dad to another
Goto Forum:
  


Current Time: Thu Apr 18 13:38:29 CDT 2024