Re: SQL*PLUS Variable assignment

From: Christian Mondrup <reccmo_at_unidhp1.uni-c.dk>
Date: 1995/09/08
Message-ID: <42pc5d$dmi_at_news.uni-c.dk>#1/1


Roger Snowden (snowden_at_haven.ios.com) wrote:

: Is it even possible to dynamically assign variables in sql*plus?  We have 
: a developer that wants to create a spool file name dynamically, 
: constructed from SYSDATE, like: 0905something.rpt.
 

: Is this doable?  

: TIA   : Roger

Yes. As documented in SQL*Plus reference you may save eg. SYSDATE in a variable:

BREAK ON today
COLUMN today NEW_VALUE _mydate
SELECT TO_CHAR(SYSDATE,'ddmm') today FROM dual; CLEAR BREAKS
define filename = &_mydate.foo.rpt

--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+ Christian Mondrup +
+ UNI-C Aarhus, Danish Computing Centre for Research and Education. +
+ Olof Palmes Alle 38, DK 8200 Aarhus N. +
+ +
+ Phone: +45 86 78 44 44 +
+ Telefax: +45 86 78 44 55 +
+ E-Mail: Christian.Mondrup_at_uni-c.dk +
+ +
+ Opinions expressed are mine and do not reflect those of my employer. +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Received on Fri Sep 08 1995 - 00:00:00 CEST

Original text of this message