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 candidate key & super key
Which dictionary view(s) would you first look at to understand or get a high-level idea of a given Advanced Replication environment?
How to Identify the previously inserted/updated records in already populated table.
Where do you use decode and case statements?
Explain the use of record option in exp command.
How do I decide when to use right joins/left joins or inner joins or how to determine which table is on which side?
How to convert dates to characters in oracle?
Explain the use of show option in imp command.
Can a parameter be passed to a cursor?
What is MTTR advisor in Oracle?
How to create tables for odbc connection testing?
How to define default values for formal parameters?