Re: spool command in sql plus

From: Mladen Gogala <mgogala_at_no.address.invalid>
Date: Fri, 2 Jul 2010 04:09:29 +0000 (UTC)
Message-ID: <i0jopp$75v$1_at_solani.org>



On Wed, 30 Jun 2010 08:22:48 -0700, dba cjb wrote:

> Does anyone know how I can achieve this using pl/sql & or substition
> variables

Yes, of course! You should start your script with the following lines:

#!/usr/bin/perl -w
use strict;
use DBI;

That will enable you to do almost any kind of report you want, titles included. Oracle's sqlplus is not a reporting tool and it shouldn't be used as such.

>
>
> My aim is to timestamp the name of my reports
>
> regards
> Chris B

Scripting languages are used for the reporting purposes. Perl or Python will both do the trick. For reporting purposes, I prefer Perl because it already contains a small report writer built into the language itself and there is an excellent template toolkit which is ideal for generating XML and various other report types.
Python, on the other hand, is easier to learn and is gaining momentum these days, mainly because Python is a truly object oriented language, while Perl object model is a byproduct of the Blair witch project and will make your hair stand and turn grey. If you have Java duhvelopers around you and want to have someone who could maintain your scripts while you are on vacation (that is sometimes a concern, too) then Python is the language for you. When presented with the choice, damagement usually selects Python.

-- 
http://mgogala.byethost5.com
Received on Thu Jul 01 2010 - 23:09:29 CDT

Original text of this message