Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> Sequence related

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: Sequence related
 muzu  Posted: Aug 21, 2007 10:00:51 AM

 Total Post: 37
 Joined: Aug, 2007






 How sequence_name.nextval can be used in the query of type "Select list of subquery in an insert statement." where the sequence is generated in the select list of subquery in an insert statement. Can any one show this type with an example ?

 charan
Posted: Aug 21, 2007 06:21:12 PM  

 Total Post: 1
 Joined: Aug, 2007






 
In Insert statement, seq.nextval will not work . it can be executed with dual like below.

select Gledi_invoice.nextval from dual;

if you want to insert sequence of numbber try with max(number) + 1 in subquery.


 Ramesh Joyisa
Posted: Aug 22, 2007 12:24:41 AM  

 Total Post: 246
 Joined: Aug, 2007






 
First select the sequence number to a variable using dual table and then use in insert statement

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Vinoth Kumar357
  Gopu Gopi340
  Gitesh Trivedi322
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software