Re: PL/SQL w/ SQL*Plus

From: omotm <tonal_at_pestilence.net>
Date: Fri, 08 Sep 2000 15:20:14 +0100
Message-ID: <39B8F59E.B8B20842_at_pestilence.net>


KrazyKat wrote:
> -----------------------------------------------------------
> BEGIN
>
> some PL/SQL
>
> IF x=y THEN
> call sqlplus_report
> END IF;
>
> do some more PL/SQL
>
> END;
> ----------------------------------------------------------
>
> Obviously I can't just call an SQL*Plus script but that's what I want
> to do. The larger question is how to generate a reasonable formatted
> report from PL./SQL without using DBMS.OUTPUT. Am I asking too much?
>

Two ways, both using provided stored packages: 1. DBMS_PIPE and a Daemon process to monitor it and execute the sql script when told to.

2. UTL_FILE You compose each report line as a char string and output to flat os file. You can easily incorporate complex queries. Output each line of a resultset - whatever totals you need, etc, etc.

HTH

-- 
"No man is happy without a delusion of
 some kind. Delusions are as necessary to
 our happiness as realities."
Received on Fri Sep 08 2000 - 16:20:14 CEST

Original text of this message