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!

Unable To Solve Syntax Error....

723451Sep 21 2009 — edited Sep 21 2009
Hi:

I am writing following pl/sql script but i am getting syntax errors:

DECLARE
CURSOR comp_cur IS select bank_id,date_created,created_by,modified_by,name from COM_BANK_MASTER
comp_rec COM_BANK_MASTER %ROWTYPE;

BEGIN
OPEN comp_cur;
FETCH comp_cur INTO comp_rec;

WHILE comp_rec%FOUND
LOOP

dbms_output.put_line(comp_rec.name);

End LOOP;
close comp_cur;
END;



Then I write another script like,
declare
cursor comp_cur is select bank_id,date_created,created_by,modified_by,name from COM_BANK_MASTER
begin
for aa in c1;
Loop
dbms_output.put_line(aa.name);
end Loop;
end;

It also getting syntax error.

Can any body help me?

Thank You.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 19 2009
Added on Sep 21 2009
11 comments
1,250 views