Topic: SQL*Plus and PL/SQL >> 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: Problem with a script prompting for data using the & |
| Fungai |
Posted: Oct 19, 2006 05:14:02 AM |
Total Post: 8
Joined: Feb, 2006
|
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 |
|
|
Vigyan |
| Posted: Oct 19, 2006 09:59:09 PM | |
|
Total Post: 386
Joined: May, 2001
|
Just curious, if you are providing data in the script then why would you choose to use &?
Would it not be easier to have data with in the insert statement?
- Vigyan
|
|
|
|
|
| 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 | 333 |
| Gitesh Trivedi | 322 |
| Vinoth Kumar | 264 |
| neeraj sharma | 258 |
| Ramesh Jois | 246 |
|
|