• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What is the errorin this procedure??

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Beksy you always amaze me. I hope one day to be as good a DBA as you are.
Mark
 
Beksy Kurian
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am still learning, Mark!
I have learned a lot by participating in this forum.
Thanks!
Regards
Beksy
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic