how to dump a query result into a spraed sheet?????
Is there any way we can dump the result of sql query(on oracle) into a spread sheet?????
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.
why not set ODBC data source and use MS excel to get
your data directly?
Nice but I dont wanna use ODBC, then what???????
Spool the result into a text file and open it into excel.
select empno||','|| ename||','|| job||','|| deptno||','|| mgr from emp;
This will create a comma seperated output and spool it in a .csv file which you can directly open in an excel sheet.
"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.
Thanks heaps AMAR, it really helped me a lot.
Click Here to Expand Forum to Full Width