please can someone just teach me how to accept users option/choice and through the choice, certain procedures would be carried out? sounds simple to me.. but i know nothing abt the syntax... how to incorporate sql*plus to pl/sql.
the one below (which is a test draft incurred a compilation error)
CREATE OR REPLACE
PACKAGE order_object as
-- PROCEDURE add_record;
CREATE PACKAGE BODY order_object as
-- local variables
dbms_output.putline('=====Please enter choice below=====');
dbms_output.putline('<< Press 1 to enter order with 1 product only >>');
dbms_output.putline('<< Press 2 to enter order with multiple products >>');
You now have a procedure that when run in SQL Plus with SERVEROUTPUT set ON produces some output prompting the user to press 1 or 2. Now what? The user types a 1 or 2 at the SQL> prompt and ...? SQL Plus will display line 1 or line 2 of the last SQL executed!
SQL Plus is not a realistic choice of user interface for an application. You should write the application in something like Oracle Forms, VB, Pro*C or whatever, that allows true user interaction.
=) I know that... this is just an assignment... learning pl/sql and the packages... so i don't quiteknow how to create a transaction apart from the normal sqlldr. its just a simple assignment... which i don't have the luxury of time ...=P and yeah. i still have probs now...
ok so i need online input of all the attributes... using just the sql*plus. how? using accept and prompt?? and then pass it through the parameters of pl/sql?