Home » RDBMS Server » Server Administration » How to Export query result to csv file
How to Export query result to csv file [message #217876] Mon, 05 February 2007 23:23 Go to next message
sponguru_dba
Messages: 51
Registered: May 2005
Location: Bangalore
Member

Hi all


How to Export query result to .csv file





Thanks in Advance
SreenivasaRao


Re: How to Export query result to csv file [message #217878 is a reply to message #217876] Mon, 05 February 2007 23:32 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

hi,
SQL> set heading off
SQL> set echo off
SQL> set feedback off
SQL> set verify off
SQL> spool d:\test\result.csv
SQL> select hiredate,ename from emp;

17-DEC-80 SMITH
20-FEB-81 ALLEN
22-FEB-81 WARD
02-APR-81 JONES
28-SEP-81 MARTIN
01-MAY-81 BLAKE
09-JUN-81 CLARK
19-APR-87 SCOTT
17-NOV-81 KING
08-SEP-81 TURNER
23-MAY-87 ADAMS
03-DEC-81 JAMES
03-DEC-81 FORD

23-JAN-82 MILLER
SQL> spool off
SQL> set heading on
SQL> set echo on
SQL> set verify on

E:\>type d:\test\result.csv
SQL> select hiredate,ename from emp;

17-DEC-80 SMITH

20-FEB-81 ALLEN

22-FEB-81 WARD

02-APR-81 JONES

28-SEP-81 MARTIN

01-MAY-81 BLAKE

09-JUN-81 CLARK

19-APR-87 SCOTT

17-NOV-81 KING

08-SEP-81 TURNER

23-MAY-87 ADAMS

03-DEC-81 JAMES

03-DEC-81 FORD


23-JAN-82 MILLER

SQL> spool off

E:\>


regards
Taj
Re: How to Export query result to csv file [message #217885 is a reply to message #217878] Mon, 05 February 2007 23:56 Go to previous messageGo to next message
sponguru_dba
Messages: 51
Registered: May 2005
Location: Bangalore
Member

Hi Taj

Thanks for Reply

But my query is comming from front-end,so that for this type query's what i have to do





Thanks in Advance
Sreenivasap





Re: How to Export query result to csv file [message #217886 is a reply to message #217885] Mon, 05 February 2007 23:59 Go to previous message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,
Try use any Front End option for export data to CSV file.
( according your front end application.)

regards
Taj
Previous Topic: Rollback Segments
Next Topic: Data Dictioanry View Doubt
Goto Forum:
  


Current Time: Wed Dec 07 11:04:19 CST 2016

Total time taken to generate the page: 0.10416 seconds