Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using UTL_FILE utility

Sreelatha PragadapatiJan 12 2017 — edited Jan 20 2017

Hi, Iam trying to export the results of a query to .xlsx using PL/SQL, but I get an error (where 'C:\Telus\TEST.xlsx' exists). As third boolean type argument in  UTL_FILE.PUT_LINE is FALSE by DEFAULT declare filename  utl_file.file_type; cursor c1 is select * from test; varc1 c1%rowtype; begin   filename    := utl_file.fopen('C:\Telus', 'TEST.xlsx', 'W');      open c1;   loop     fetch c1 into varc1;     exit when c1%notfound;        utl_file.put_line(filename,varc1,true);   end loop;   utl_file.fclose(filename);   close c1; end; PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 17 2017
Added on Jan 12 2017
22 comments
1,667 views