RE: UTL_FILE question
Title: Message I would create a new version of the procedure that took the date from and to as parameters and output a file named appropriately for the date range. You would then just call this 24 times. Niall -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ViktorSent: 31 January 2004 00:24To: Multiple recipients of list ORACLE-LSubject: UTL_FILE question Hello, Ihave a procedure that open a cursor anddumps some data for last 24 monthsto a file. The date range is static condition definedinside the cursor. Procedure is working great, but Iwhat I'm havingproblemfiguring outisif there is a way to create not one file with all the data, but multiple files with monthly sets of data. This way data formonth1 is created as filename_012002.txt and so forth. Thanks much! Viktor Do you Yahoo!?Yahoo! SiteBuilder - Free web site building tool. Try it!
Re: Utl_file question
Did you have END; on line 11? Bryan - Original Message - To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Sent: Thursday, March 15, 2001 9:42 AM Hallo all experts, I have written this procedure but get this error message. What is wrong? 1 DECLARE 2 emp_data UTL_FILE.FILE_TYPE; 3 BEGIN 4 emp_data := UTL_FILE.FOPEN ('c:\', 'pelle.xls', 'W'); 5 FOR BAKERS IN ( 6 select AVDNR, DATO 7 FROM BAKERS) LOOP 8 UTL_FILE.PUT_LINE (emp_data, TO_CHAR(BAKERS.DATO ) ||',"'|| BAKERS.AVDNR || '"'); 9 END LOOP; 10* UTL_FILE.FCLOSE (emp_data) DECLARE * ERROR at line 1: ORA-06550: line 11, column 0: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: := . ( % ; Hope anyone can help me. Roland Skldblom -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Bryan Sirtosky INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: Utl_file question
Well, maybe you just forgot to paste it in, but you need a semicolon at the end of line 10, and a forward slash in the first position of line 11. ;-) Or is that too simple? Otherwise, it looks good to me... Diana -Original Message- Sent: Thursday, March 15, 2001 9:43 AM To: Multiple recipients of list ORACLE-L Hallo all experts, I have written this procedure but get this error message. What is wrong? 1 DECLARE 2 emp_data UTL_FILE.FILE_TYPE; 3 BEGIN 4 emp_data := UTL_FILE.FOPEN ('c:\', 'pelle.xls', 'W'); 5 FOR BAKERS IN ( 6 select AVDNR, DATO 7 FROM BAKERS) LOOP 8 UTL_FILE.PUT_LINE (emp_data, TO_CHAR(BAKERS.DATO ) ||',"'|| BAKERS.AVDNR || '"'); 9 END LOOP; 10* UTL_FILE.FCLOSE (emp_data) DECLARE * ERROR at line 1: ORA-06550: line 11, column 0: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: := . ( % ; Hope anyone can help me. Roland Skldblom -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Diana Duncan INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: Utl_file question
Can you show the entire script. There is no semi-colon at end of statement on line 11. Rick -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Thursday, March 15, 2001 9:43 AM To: Multiple recipients of list ORACLE-L Subject: Utl_file question Hallo all experts, I have written this procedure but get this error message. What is wrong? 1 DECLARE 2 emp_data UTL_FILE.FILE_TYPE; 3 BEGIN 4 emp_data := UTL_FILE.FOPEN ('c:\', 'pelle.xls', 'W'); 5 FOR BAKERS IN ( 6 select AVDNR, DATO 7 FROM BAKERS) LOOP 8 UTL_FILE.PUT_LINE (emp_data, TO_CHAR(BAKERS.DATO ) ||',"'|| BAKERS.AVDNR || '"'); 9 END LOOP; 10* UTL_FILE.FCLOSE (emp_data) DECLARE * ERROR at line 1: ORA-06550: line 11, column 0: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: := . ( % ; Hope anyone can help me. Roland Skldblom -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Cale, Rick T (Richard) INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: Utl_file question
It appears that something is missing (or maybe 2 things). 1. Line terminator (;) on line 10. 2. End of block indicator (end). -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Thursday, March 15, 2001 9:43 AM To: Multiple recipients of list ORACLE-L Subject:Utl_file question Hallo all experts, I have written this procedure but get this error message. What is wrong? 1 DECLARE 2 emp_data UTL_FILE.FILE_TYPE; 3 BEGIN 4 emp_data := UTL_FILE.FOPEN ('c:\', 'pelle.xls', 'W'); 5 FOR BAKERS IN ( 6 select AVDNR, DATO 7 FROM BAKERS) LOOP 8 UTL_FILE.PUT_LINE (emp_data, TO_CHAR(BAKERS.DATO ) ||',"'|| BAKERS.AVDNR || '"'); 9 END LOOP; 10* UTL_FILE.FCLOSE (emp_data) DECLARE * ERROR at line 1: ORA-06550: line 11, column 0: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: := . ( % ; Hope anyone can help me. Roland Skoldblom -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: William Rogge INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).