File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Oracle/OAS and the fly likes What is the errorin this procedure?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "What is the errorin this procedure??" Watch "What is the errorin this procedure??" New topic
Author

What is the errorin this procedure??

Chhaya Dhanani
Ranch Hand

Joined: Apr 11, 2001
Posts: 70
hi all,
i have written a procedure which will read from a table and insert into another two tables.
when i run it it keeps throwing the following error:
Warning: Procedure created with compilation errors.
the procedure is as follows:
create or replace procedure cbaoffline_activation
as
Cursor cbacur is select accountnumber,userid,billerid,categoryid,billername
from customer_biller_account
where substr(userid,1,3) in (select micrcitycode from city_info)
and activation_status='PEND';
cbarec customer_biller_account%ROWTYPE;
Begin
Begin transaction;
Open cbacur;
Loop
Fetch cbacur into cbarec;
Insert into activation_log values('||cbarec.userid||','admin','ACTIVE','||cbarec.accountnumber||',sysdate,'||cbarec.billerid|
|','||cbarec.categoryid||','||cbarec.billername||','||substr(cbarec.userid,1,3)||');
Exit when cbacur%notfound;
END LOOP
Close cbacur;
Update customer_biller_account set activation_status='ACTIVE' where activation_status='PEND'
and substr(userid,1,3) in (select micrcitycode from city_info) and activation_status='PEND';
Commit transaction;
end;
Pls help me with this as soon as possible...SOS
Thanx in advance
Chhaya
Beksy Kurian
Ranch Hand

Joined: Jul 11, 2001
Posts: 254
missing a semicolon after the end loop statement!
Type show errors and see whether it shows any errors.Just say commit instead of commit transaction. Don't you want to end the transaction? Is it ported from sqlserver?
Regards
Beksy
[ September 17, 2002: Message edited by: Beksy Kurian ]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Beksy you always amaze me. I hope one day to be as good a DBA as you are.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Beksy Kurian
Ranch Hand

Joined: Jul 11, 2001
Posts: 254
I am still learning, Mark!
I have learned a lot by participating in this forum.
Thanks!
Regards
Beksy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the errorin this procedure??
 
Similar Threads
Auto generate Index scripts
ORA-00001: unique constraint exception
SQL statement to java
Store Procedure Codes Badlu In need of Help!!
URGENT:::Can DML operation "insert" works inside a PL/SQL stored function ?