Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

issue with bulk collect

NeilCSENov 24 2011 — edited Nov 25 2011
I trying to learn bulk collect, I am not able to print the empno ename with the below code etc.. plz help
declare
type t is table of emp%rowtype;
t1 t;
begin
select * bulk collect into t1 from emp;
forall i in t1.first..t1.last
dbms_output.put_line(t1.(i));
end;
/
ERROR at line 7:
ORA-06550: line 7, column 1:
PLS-00103: Encountered the symbol "DBMS_OUTPUT" when expecting one of the
following:
. ( * @ % & - + / at mod remainder rem select update with
<an exponent (**)> delete insert || execute multiset save
merge
The symbol "." was substituted for "DBMS_OUTPUT" to continue.
ORA-06550: line 7, column 25:
PLS-00103: Encountered the symbol "(" when expecting one of the following:
<an identifier> <a double-quoted delimited-identifier> delete
exists prior
The symbol "<an identifier>" was substituted for "(" to continue.
ORA-06550: line 7, column 29:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
. ( * % & - + / at mod remainder rem select update with
<an exponent (**)> delete insert || execute multiset save
merge

Edited by: NeilCSE on Nov 24, 2011 1:44 PM

Edited by: NeilCSE on Nov 24, 2011 2:23 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 23 2011
Added on Nov 24 2011
6 comments
3,202 views