• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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!
reply
    Bookmark Topic Watch Topic
  • New Topic