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 difference between "as" and "is" in an oracle stored procedure?
can anyody please send me the dump for Oracle 10g certifications for DBA path?
How to change user password in oracle?
What are the database administrators utilities available?
There are n numbers of flatfile of exactly same format are placed in a folder.Can we load these flatfile's data one by one to a single relational table by a single session??
Can we call procedure inside function in oracle?
What is oracle rowcount?
Can we use bind variables in oracle stored procedure?
What is the disadvantage of User defind function?
Please explain me all types of Data models. Also give me the details if each model can have other name.for example:schematic data model is also known as conceptual data model and entity relation data model.
What is the relationship among database, tablespace and data file?
Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.
WHAT IS ecc 6.0
How to start a specific oracle instance?
How to load excel data sheet to oracle database