Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to run PL/SQL?
In article <7vrql0$dka$1_at_justice.csc.cuhk.edu.hk>,
"Jeff Lee" <kit_at_cintec.cuhk.edu.hk> wrote:
> Hi,
>
> Do you have experience on PL/SQL?
> Could you share with me how can I get my script work?
>
> Jeff
>
Jeff, could you be a little more specific? You can execute a pl/sql
script from sqlplus by issuing the command 'start script_name'
You can place both sqlplus commands and pl/sql into the same script, but you can not inter-mix the two sets of commands, example:
set echo off <== sqlplus commands and comments
rem
rem SQL*Plus scripts
rem
set serveroutput on <== Display output of dbms_output in sqlplus
spool myspool
declare <== Start of pl/sql; sqlplus not allowed
v_date varchar2(08);
-- Display the Datebegin
end; <== End of pl/sql / <== Execute pl/sql spool off <== Back in sqlplus
You can execute a stored procedure from sqlplus using the execute command: execute procedure_name(parameters.....) ;
I hope his helps.
--
Mark D. Powell -- The only advice that counts is the advice that
you follow so follow your own advice --
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Nov 04 1999 - 08:20:21 CST