Odp: Implementing PL/SQL

From: Daniel Lisiecki <lisu_at_venus.wmid.amu.edu.pl>
Date: Tue, 16 Nov 1999 09:17:44 GMT
Message-ID: <Yi9Y3.33030$jG2.662141_at_news.tpnet.pl>


Użytkownik Maurice Isler <mauricei_at_mindspring.com> w wiadomości do grup dyskusyjnych napisał:38310e5c.11618074_at_news.mindspring.com...
> I'm new to Oracle and SQL and would like to know how to implement
> PL/SQL. If I'm reading my information right I'm supposed to implement
> it from the SQL > prompt. But I don't know whether PL/SQL should be
> written as a text file,

 Yes it can be saved as a txt file. You only write a PL/SQL source in e.g. notepad.

> will it execute from the prompt, how do I
> compile and save the procedures? any help would be appreciated.

To run a script from command line you should write: plus80 <user>/<passwd>_at_<dblink> @<filename> or plus80w (same options) to run windows wersion of this tool. If you add "exit" command at end of script, plus80 will automaticly exit after job completition.
This is a template of script, that creates procedure:

CREATE OR REPLACE PROCEDURE <proc_name>(<params>) AS <add local variables here>
BEGIN
    <do some operations>
END;
/

The "/" symbol is needed for PL/SQL to identify an end of script. All instructions added after this sign will by abandoned. More about writing scripts,procedures and funtions you can find in Oracle Help.

Daniel Lisiecki
Poznań, Poland
lis9_at_kki.net.pl
lisu_at_nr134.mikronika.com.pl Received on Tue Nov 16 1999 - 10:17:44 CET

Original text of this message