how to retrieve data from different tables ,place this data in different excel worksheets.
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 |
What is a Synonym ?
Will the Optimizer always use COST-based approach if OPTIMIZER_MODE is set to "Cost"?
What do you understand by a database object?
What privilege is needed for a user to connect to oracle server?
How many types of cluster table in Oracle?
17. Display the order number and average item cost for each order.
What is the difference between translate and replace in oracle?
What is RULE-based approach to optimization ?
How to update values in a table in oracle?
Explain the use of indexes option in imp command.
What is OCI. What are its uses?
What is the use of file param in imp command?