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 do I limit the number of oracle database connections generated by weblogic server?
What is the difference between sharding and replication?
How to change program global area (pga) in oracle?
How to run the anonymous block again?
How to empty your oracle recycle bin?
How to do paging with oracle?
In oracle there is column command, how will you explain that?
How to delete multiple rows from a table in oracle?
How to download oracle database 10g xe?
Can group functions be used in the order by clause in oracle?
I am using an Oracle 8i Database my data contains Clob data. I am using toad version 7.6 i am able to get the data in toad but unable to extract the data in excel.when trying to extract the data into the excel the toad error says out of memory. Can any body please help me to extract the data through the same toad version. Thanks in advance
Is oracle a relational database?
How to invoke the data pump export utility?
Explain the use of online redo log files in oracle.
Can u please explain me the Discussion on Except ,using cast like type cast. Question in the context of difference between two tables