Path: newssvr20.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!newsfeed.cwix.com!news.maxwell.syr.edu!postnews1.google.com!not-for-mail
From: sybrandb@yahoo.com
Newsgroups: comp.databases.oracle.tools
Subject: Re: SQL*Plus break header
Date: 11 Nov 2003 01:36:21 -0800
Organization: http://groups.google.com
Lines: 38
Message-ID: <a1d154f4.0311110136.73ef31a@posting.google.com>
References: <455f7154.0311101302.310abb98@posting.google.com> <booukh$ll8$1@news4.tilbu1.nb.home.nl> <455f7154.0311101753.1a54a17b@posting.google.com>
NNTP-Posting-Host: 145.13.42.4
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1068543381 18650 127.0.0.1 (11 Nov 2003 09:36:21 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 11 Nov 2003 09:36:21 +0000 (UTC)
Xref: newssvr20.news.prodigy.com comp.databases.oracle.tools:83481

pbewig@swbell.net (Phil Bewig) wrote in message news:<455f7154.0311101753.1a54a17b@posting.google.com>...
> Frank <fbortel@home.nl> wrote in message news:<booukh$ll8$1@news4.tilbu1.nb.home.nl>...
> > Phil Bewig wrote:
> > 
> > > I am using SQL*Plus and ordinary SQL (no PL/SQL) to create a
> > > report.  I would like to write a header line each time a field
> > > breaks:
> > Something like 'new value' pops to mind
> 
> I don't have any problem getting the value.  The problem is
> formatting the BREAK ON column and an associated column so
> they print once on a separate line at the head of the break
> instead of being repeated on each line.
> 
> If you have a solution using NEW_VALUE could you please be
> more specific?
> 
> Many thanks,
> 
> Phil

The new_value solution typically comes into play when you want to use
the column value in a title. Otherwise it isn't of much use.
To avoid repeating you simply need to use the nodup(licates) clause of
the break command.
If you want to use the value in a title you need to have

column bar new_value _bar noprint
ttitle "current value of bar is &_bar" center skip 2
break on bar skip page nodup
select bar, <whatever you want> 
from foo
/

Hth

Sybrand Bakker
Senior Oracle DBA
