Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

PL/SQL compilation error

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
How can I resolve the compilation error :
INSERT INTO Paiement VALUES(seq_noPaiement.nextval, noLiv, myDate);
dbms_output.put_line('NoPaiement : ' || seq_noPaiement.currval);
The error occurs when I do the put_line with seq_noPaiement.currval...
I also tried to do this :
myVar := seq_noPaiement.nextval;
INSERT INTO Paiement VALUES (myVar, noLiv, myDate);
dbms_output.put_line('NoPaiement : ' || myVar);
But it didn't work too...
So I don't have any idea about how to resolve this ... ???
Thansk,
Eric
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't use the CURRVAL pseudocolumn on the DBMS_OUTPUT call.
Try this link.
Hope that helps
 
Remar Uy
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can try this code:
 
Eric Benoit
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot!
 
Oh, sure, you could do that. Or you could eat some pie. While reading this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic