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: UTL_FILE question

Re: UTL_FILE question

From: Viktor <stant_98_at_yahoo.com>
Date: Sun, 1 Feb 2004 09:18:00 -0800 (PST)
Message-ID: <20040201171800.70750.qmail@web13425.mail.yahoo.com>


Thanks Connor,  

I'll give it a try. but i am still not quite sure how i can manipulate the file name so that for month1, filename is <filename_200201.txt> month2 - <filename_200202.txt.  

Thanks again for your help!
Connor McDonald <hamcdc_at_yahoo.co.uk> wrote: declare
prev_mth number := -1;
begin
for i in my_big_24mth_cursor loop
if to_number(to_char(i.date_of_interest,'MM')) != prev_mth then if utl_file.is_open(f) then
close file;
end if;
open file;
prev_mth := to_number(to_char(i.date_of_interest,'MM')); end if;
write line to file
end loop;
end;

or thereabouts

hth
connor


Connor McDonald
Co-author: "Mastering Oracle PL/SQL - Practical Solutions" - available now
web: http://www.oracledba.co.uk
web: http://www.oaktable.net

email: connor_mcdonald_at_yahoo.com

"GIVE a man a fish and he will eat for a day. But TEACH him how to fish, and...he will sit in a boat and drink beer all day"



BT Yahoo! Broadband - Free modem offer, sign up online today and save £80 http://btyahoo.yahoo.co.uk

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

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Sun Feb 01 2004 - 11:18:00 CST

Original text of this message

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