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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: help - spool file name - use variable

RE: help - spool file name - use variable

From: Gogala, Mladen <MGogala_at_oxhp.com>
Date: Tue, 24 Apr 2001 13:17:30 -0700
Message-ID: <F001.002F125E.20010424124711@fatcity.com>

What exactly didn't work? Do you have "define" on or off?  

 -----Original Message-----
Sent: Tuesday, April 24, 2001 2:53 PM
To: Multiple recipients of list ORACLE-L

I tried, but didnot work.

I hard code them now.

Thanks

  "Gogala, Mladen" <MGogala_at_oxhp.com> wrote:

How about "spool &report_id.dat" ?

-----Original Message-----
Sent: Monday, April 23, 2001 6:22 PM
To: Multiple recipients of list ORACLE-L

I'm writing a sql script file (first run couple of queries, insert results into a temp table), at last, the data need to spool out to separate files. the requirement was want the report name to be able to change depend on the query. Therefore, I have a variable in the temp table. Now I want to be able to enclose this variable name in my report name. like:

temp table has: report_id, division, room ...

So, the report will like:

SPOOL C:\c\CYCLE_COUNT_${REPORT_id}.DAT ... ( for report 1)

SPOOL C:\c\CYCLE_COUNT_${REPORT_id}.DAT ... ( for report 2)

however, when I'm coding now, the '${REPORT_id}" is unknown. The value variable will get at run time. I don't know how to be dynami! ! c.

Hope I explain better this time. Thanks a lot.

Diego Cutrone wrote:

Hi,

I don't quite understand your question, so here's what I understood:

Just enclose the variable name with "{ }" , here's an example

/home/oracle> export temp_variable=TEST
/home/oracle> echo "this_is_a_$temp_variable_only" this_is_a_
-- wrong

/home/oracle> echo "this_is_a_${temp_variable}_only" this_is_a_TEST_only
/home/oracle>

Hope it helps

To: Multiple recipients of list ORACLE-L

Sent: Monday, April 23, 2001 2:50 PM

Hello:

I'm trying to spool out couple of files from my temp table. Part of the file name is coming from a variable from the temp table. I use:

spool C:\CYCLE_COUNT_$temp_vari! ! able.DAT

but it's only one physical name instead of using the variable.

How can I code the variable name as part of (spool) file name?

Thanks


Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices


Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Gogala, Mladen
INET: MGogala_at_oxhp.com

Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists



To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the me! ! ssage BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

Do You Yahoo!?
Yahoo! <http://auctions.yahoo.com/> Auctions - buy the things you want at great prices

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Gogala, Mladen
  INET: MGogala_at_oxhp.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Apr 24 2001 - 15:17:30 CDT

Original text of this message

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