Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Dynamic ally display column name

Re: Dynamic ally display column name

From: Kay Kanekowski <kay.kanekowski_at_web.de>
Date: Tue, 8 Apr 2003 21:52:17 +0200
Message-ID: <b6v9bc$92erj$1@ID-183343.news.dfncis.de>


Hi ,

try the 'col .... heading "&new_column_name" ' and fill the sql-variable new_column_name with the actual fiscal_year

e.g
COL spoolfile NOPRINT NEW_VALUE spool_file SELECT DISTINCT TO_CHAR(sysdate ) || '.txt' spoolfile FROM dual; col fiscal_year heading "&spool_file"

hth
Kay

"Ning li" <ningli2000_at_worldnet.att.net> schrieb im Newsbeitrag news:4_rja.14082$cO3.968282_at_bgtnsc04-news.ops.worldnet.att.net...
> Hi,
>
> I am trying to put the value of the fiscal_year, such as "2000" on the
> report column heading. I am using sqlplus to generate the reports.
>
> Thanks.
>
> Nick
>
> "Karsten Farrell" <kfarrell_at_belgariad.com> wrote in message
> news:MPG.18f78ddf9c96e69b98971c_at_news.la.sbcglobal.net...
> > ningli2000_at_hotmail.com said...
> > > Hi,
> > >
> > > I have a column in an Oracle table called fiscal_year. I created
> > > some reports by each fiscal_year, such as 2000, 2001, 2002, etc. For
> > > each yearly report, the fiscal_year value will be unique and of that
> > > particular year, say 2000. I would like to dynamically use the vaule
> > > the year such as "2000" to replace the default column name of the
> > > report("fiscal_year"). Could anyone give some advice on how that could
> > > be done?
> > >
> > > Thanks in advance.
> > >
> > > Nick
> > >
> > Can you restate your question?
> >
> > I am not sure what you are trying to replace with the fiscal year ...
> > the filename of the report (eg, report_2000.rpt), the title of your
> > report (eg, "Some Stuff From 2000"), the report column heading (eg,
> > "2000"), a parameter that you use in the WHERE clause (eg, where
> > fiscal_year = "2000"), or something else.
> >
> > Where do you use _report("fiscal_year")_? What language are you writing
> > your reports in (sqlplus or something else)?
> > --
> > /Karsten
> > DBA > retired > DBA
>
>
Received on Tue Apr 08 2003 - 14:52:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US