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 |
Send this thread to your friend |
|
|
|
|
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 Khokhar | 857 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| Gopu Gopi | 334 |
| Gitesh Trivedi | 322 |
| Vinoth Kumar | 264 |
| neeraj sharma | 258 |
| Ramesh Jois | 246 |
|
|