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 |
How to run create database statement?
What is a trigger oracle?
Explain the blob datatype?
How to write a left outer join with the where clause in oracle?
Shall I get Pro*C Compiler in Oracle-10g release ?
Why we use bulk collect in oracle?
What do you mean by redo log file mirroring?
How to convert csv to table in oracle?
Why do we use coalesce function in oracle?
How to drop a stored procedure in oracle?
What is the usage of analyze command in oracle?
two tables are there emp(eno,ename,sal,deptno),dept(deptno,dname).how form the query in deptno,ename,max(sal)