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
How to load data from external tables to regular tables?
What is an oracle database table?
Why does oracle 9i treat an empty string as null?
How to write date and time interval literals in oracle?
Assuming today is Monday, how would you use the DBMS_JOB package to schedule the execution of a given procedure owned by SCOTT to start Wednesday at 9AM and to run subsequently every other day at 2AM.
What is dual table oracle?
In SAP ECC 6.0 , under DB02 tcode , Tablespace name to be explain stepy step all the col
How to end the current transaction in oracle?
How to use values from other tables in update statements using oracle?
What are the attributes of cursor?
What are the different types of synonyms?
Explain oracle’s system global area (sga).
Is postgres faster than oracle?
What is concurrency in oracle?
How can I convert single byte kana characters into multi byte kana characters and vice-versa.