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

Home -> Community -> Usenet -> c.d.o.server -> Re: Using Substitution Variables Dynamically in File Names

Re: Using Substitution Variables Dynamically in File Names

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Tue, 16 Oct 2007 19:37:17 +0200
Message-ID: <ff2ssa$pd5$1@news3.zwoll1.ov.home.nl>


sfitzgerald02_at_gmail.com wrote:
> I'm looking to use a substitution variable in a file name. Here is
> what I have so far.
>
> column sn new_value company_name noprint
> select scompanyname into :company_name from tblcompany where
> ncompanyid = :companyid
> spool /home/utils/companyReport/&company_name.&file_time..txt
>
> prompt -- &company_name --;
>
> The variable &company_name doesn't appear to be working. Any help
> would be appreciated.
>
> Thanks.
>
> Steve
>

Define not working.

col sn noprint new_value company_name

select scompanyname sn from tblcompany where ncompanyid = :companyid

No idea where you get :companyid from - shouldn't it be &companyid?!?

And use double ampersands (&&) in stead of single.

-- 
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Received on Tue Oct 16 2007 - 12:37:17 CDT

Original text of this message

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