Tom's Guide | Tom's Hardware | Tom's Games | PC Safety Suite
![]() |
![]() |
![]() |
Comment:
Hi,
i have ksh script to fetch the data from oracle database and store the output in a .xls or .csv file. But the output having more then 70,000 rows. How can i store those files in .xls or csv files.
Could you please suyggest is thre any other way to do that?
+1 | ![]() |
also provide your script as an example.
The easiest way is to use the spool command passed to oracle, so it will look like:spool filename1.csv select foo||','||bar from data where hello is world; spool filename2.csv select foo||','||bar from database where stuff is thing;the above will output multiple files for each query, if you want one file for all queries, do:
spool filename1.csv select foo||','||bar from data where hello is world; select foo||','||bar from database where stuff is thing;the ||','|| inserts a comma between your selections, which is what you would want for a .csv file.
To convert a .csv to a .xls, see if csv2xls is installed.
![]() |
read id's from one text a...
|
perl script
|
| Login or Register to Reply | |
| Login | Register |