-
how to dump a query result into a spraed sheet?????
Hi all
Is there any way we can dump the result of sql query(on oracle) into a spread sheet?????
for example::
select eno, ename, job, dept, mgr from emp;
and the query fetches say about 100000 records and the width of a paper is not enough as the result is more than twice of a A4 size paper. So i want spool the extract into a spreadsheet.
Any help would be greatly appreciated.
raj
rajorcl
-
why not set ODBC data source and use MS excel to get
your data directly?
-
Nice but I dont wanna use ODBC, then what???????
rajorcl
-
hi.
Spool the result into a text file and open it into excel.
Soni
-
Do
spool out.csv
select empno||','|| ename||','|| job||','|| deptno||','|| mgr from emp;
spool off
This will create a comma seperated output and spool it in a .csv file which you can directly open in an excel sheet.
Amar
"There is a difference between knowing the path and walking the path."
-
U can use Spool and for readable format, from SQL prompt, u can set ur enviroment by setting linesize->custome and type the Nunber, and set the Pagesize to custome and type the Number.
By this, u will be able to increase ur horizental & vertical lines.
The spool file which u have created can be opened in Excel.
vishal sood
OCP 8
-
Thanks heaps AMAR, it really helped me a lot.
Regards
rajorcl
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|