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 >> To Vigyan and Others-Problem with a script prompting for data using the &

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: To Vigyan and Others-Problem with a script prompting for data using the &
 Fungai  Posted: Oct 20, 2006 02:51:15 AM

 Total Post: 8
 Joined: Feb, 2006






 Dear Vigyan and Others

I am answering a project question in which i am asked to write a script that prompt for input (several insert statements)and the examiner is not going to feed in the data but the script must feed itself with input.

I have a problem with a script that i wrote which prompt for input but in this case the input is already supplied within the script. If i copy the scripts individually and paste them in SQL*Plus, the insert statement inserts the pre-provided data properly. The problem comes when i try to run the script which contains the insert statements using the @c:\. The following are the insert statements within the script.

insert into MEMBER (member_id, Last_Name, First_Name, Address, City, Phone, Join_Date)
Values (&member_id, '&Last_Name', '&First_Name', '&Address', '&City', '&Phone', '&Join_Date');
member_id_seq.NEXTVAL
Quick-to-See
Mark
6921 King Way
Lagos
63-559-7777
07-APR-1990
commit;

insert into MEMBER (member_id, Last_Name, First_Name, Address, City, Phone, Join_Date)
Values (&member_id, '&Last_Name', '&First_Name', '&Address', '&City', '&Phone', '&Join_Date');
member_id_seq.NEXTVAL
Ropeburn
Audry
86 Chu Street
Hong Kong
41-559-87
18-JAN-1991
commit;

insert into MEMBER (member_id, Last_Name, First_Name, Address, City, Phone, Join_Date)
Values (&member_id, '&Last_Name', '&First_Name', '&Address', '&City', '&Phone', '&Join_Date');
member_id_seq.NEXTVAL
Urguhart
Molly
3035 Laurier
Quebec
418-542-9988
18-JAN-1991
commit;

Please help as this problem has hindered the progress of my project.

Thank Yoy

Fungai Mandikuwaza

 nirav
Posted: Oct 22, 2006 06:56:04 AM  

 Total Post: 20
 Joined: Jun, 2005






 
here is a quick hint..try 'set scan off' in the script..i did not have the time to verify this , but you can read up and try that...

 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
  Gopu Gopi334
  Gitesh Trivedi322
  Vinoth Kumar264
  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