473,388 Members | 1,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

bulk collect

Hello every one I trying simple bulk collect , it is giving me an error in oracle 9i, i wroe as per book and on the web deatils about bulk collect
declare
type emp_type is table of emp%rowtype;
v_emp_type emp_type;
cursor c is
select empno from emp;
begin
open c;
loop
fetch c bulk collect into v_emp_type;
end loop;
close c;
end;


ERROR at line 9:
ORA-06550: line 9, column 29:
PLS-00597: expression 'V_EMP_TYPE' in the INTO list is of wrong type
ORA-06550: line 9, column 3:
PL/SQL: SQL Statement ignored
Nov 17 '06 #1
1 2872
pragatiswain
96 Expert
Try the following:
declare
type emp_type is table of emp%rowtype;
v_emp_type emp_type;
cursor c is
--select empno from emp;
select * from emp;
begin
open c;
loop
fetch c bulk collect into v_emp_type;
end loop;
close c;
end;

Hope this helps
Nov 17 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Paul Rowe | last post by:
Hi "You" I have two collection types declared at the SQL level. 1. Do you know of any known bugs with the BULK COLLECT clause used with the TABLE operator? I have a situation now where I am...
2
by: G Uljee | last post by:
Can someone help me with my performance problem? I need to read a large queue (MSMQ, sometimes the max of 4MB) and want to save that directly into a Access 2003 database. On the moment I save per...
6
by: Sean | last post by:
HI There, I am making the transition from asp to asp .net, I am currenty writing an application that requires a bulk insert from a webform into SQL server, normally I would just create rows of...
2
by: Amir | last post by:
Hi every one I have an application that should send email to notify users. But the message's body is dynamic and changes for every user. In fact there is a template that for everyone the dynamic...
1
by: sumanroyc | last post by:
Hi, We are trying to insert into a remote database using the forall statement 5000 rows at a time. type t_column_id is table of number index by binary_integer; v_column_id t_column_id; begin...
1
by: devmiral | last post by:
hello every one why is this not working, all books say this code but it is not working in oracle 9i1.0 declare type emp_type is table of emp%rowtype; v_emp_type emp_type; cursor c is select...
0
debasisdas
by: debasisdas | last post by:
We can fetch from a cursor into one or more collections: DECLARE TYPE NameList IS TABLE OF employees.last_name%TYPE; TYPE SalList IS TABLE OF employees.salary%TYPE; CURSOR c1 IS SELECT...
2
by: pravatjena | last post by:
can someone explain clearly what is bulk collect and for all..........
3
by: oravm | last post by:
Hi, I re-write a query and used bulk collect to improve the performance of the batch process. The query below has NO compile error but when execute query there is error 'ORA-01403: no data...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.