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: Helen Zhung <lannyue_at_yahoo.com>
Date: Tue, 24 Apr 2001 11:43:01 -0700
Message-ID: <F001.002F0E83.20010424105310@fatcity.com>


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 PMTo: Multiple recipients of list ORACLE-LI'm writing a sql script file (first run couple of queries, insert resultsinto 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 thequery. Therefore, I have a variable in the temp table. Now I want to be ableto 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 valuevariable 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----- Original Message ----- To: Multiple recipients of list ORACLE-L Sent: Monday, April 23, 2001 2:50 PMHello: I'm trying to spool out couple of files from my temp table. Part of the filename 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 atgreat prices_____ Do You Yahoo!?Yahoo! Auctions - buy the things you want atgreat prices-- Please see the official ORACLE-L FAQ: http://www.orafaq.com-- Author: Gogala, MladenINET: MGogala@oxhp.comFat City Network Services -- (858) 538-5051 FAX: (858) 538-5051San Diego, California -- Public Internet access / Mailing Lists--------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail messageto: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and inthe me!

!

ssage BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from). You mayalso send the HELP command for other information (like subscribing).Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices Received on Tue Apr 24 2001 - 13:43:01 CDT

Original text of this message

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