how to retrieve data from different tables ,place this data in different excel worksheets.
Answer Posted / mahesh_ch
declare
cursor c1 is select e.empno,e.ename,e.sal,e.deptno,d.deptno dno,d.dname,d.loc from emp e,dept d where e.deptno=d.deptno;
fp utl_file.file_type;
cfilename varchar2(20);
begin
cfilename:='office'||to_char(to_date('2007','yyyy'),'yyyy')||'.xls'; /*specifying filename*/
fp:=utl_file.fopen('DATA_PUMP_DIR',cfilename,'w'); /*DATA_PUMP_DIR is a default directory*/
for i in c1 loop
UTL_FILE.PUT_LINE(fp,i.empno||i.ename||i.sal||i.deptno);
end loop;
utl_file.fclose(fp);
end;
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the best way to do multi-row insert in oracle?
What is background process in Oracle?
What is oracle server autotrace in oracle?
Please explain oracle left join with an example?
What is java oracle used for?
How to define a sub function?
Can we create trigger on materialized view in oracle?
How to create a table in a specific tablespace?
How do I uninstall oracle 11g?
What are the predefined tablespaces in a database?
How to login to the server without an instance?
How do I find my oracle client driver version?
What is truncate oracle?
What is Java Pool in Oracle?
How can we delete duplicate rows in a table?