Re: Full PL/SQL Programs
Date: 1995/04/03
Message-ID: <3lpnhp$koh_at_eccdb1.pms.ford.com>#1/1
|> > In article <1995Mar24.004046.22795_at_biosym.com>, ahr_at_biosym.com (Alan H. Rosenthal ) writes:
|> > |> Hi,
|> > |>
|> > |> I have rtfm'ed and I can not find an example of a full PL/SQL
|> > |> 2.0 program that runs in the SQL*PLUS environment. Specifically,
|> > |> I want to be able to write a program that consists of a single
|> > |> main routine and a few procedures and functions.
|> > |>
|> > |> For example:
|> > |>
|> > |> procedure xyz is
|> > |> n number ;
|> > |> begin
|> > |> n := 1 ;
|> > |> end ;
|> > |> begin
|> > |> xyz ;
|> > |> end ;
|> > |>
|> > |> when I try to run this I get a syntax error on the first line.
|> > |>
|> > |> Can you write such a program?????
|>
|
Ye you can write such programs,
It is expecting DECLARE in the first line.
You can define your procedures and functions in between your main declare and begin
DECLARE procedure xyz is n NUMBER; begin n := 1; end; BEGIN xyz; END; /
Type this in a file.sql and run this in sqlplus. Just works fine.
Madhavi Lokam Received on Mon Apr 03 1995 - 00:00:00 CEST