Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: a newwbie's question
Thank you. This gives me a good starting point.
wds wrote:
> Accept is a SQLPlus command and only works within SQLPlus.
>
> You can call a stored procedure and pass the accept values to it
>
> Create your SP:
>
> Create or Replace Procedure add_emp
> ( p_name emp_hist.name%type,
> p_id emp_hist.id%type,
> p_effective_date emp_hist.effective_date%type
> ) as
>
> Begin
> Insert into emp_hist
> (
> name,
> id,
> effective_date
> )
> values
> (
> p_name,
> p_id,
> p_effective_date
> ) ;
> commit;
>
> End;
> /
>
> Create a SQLPLus Script:
>
> Accept v_name prompt 'Enter the employee s name: ' ;
> Accept v_id prompt 'Enter the employee s id: ' ;
> Accept v_date prompt 'Enter the effective date using MM/DD/YYYY
> format:
>
> Execute add_emp('&&v_name', '&&v_id', to_date('&&v_date', 'MM/DD/YYYY'
> );
Received on Sun Oct 19 1997 - 00:00:00 CDT
![]() |
![]() |