Home » SQL & PL/SQL » SQL & PL/SQL » table to text conversion
table to text conversion [message #20378] Mon, 20 May 2002 00:36 Go to next message
prem kumar
Messages: 3
Registered: May 2002
Junior Member
1) Could It is possible to convert table data into text file ? if Yes, please tell me.
Re: table to text conversion [message #20382 is a reply to message #20378] Mon, 20 May 2002 06:02 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
SQL> get a
1 set feedback off;
2 set verify off;
3 SET PAGES 0
4 SET PAGESIZE 0
5 SET TERMOUT OFF
6 SET PAUSE OFF
7 SET NEWPAGE NONE
8 SET COLSEP ','
9 SPOOL c:mag.txt
10 SELECT * FROM emp;
11* SPOOL OFF;
SQL> @a
----------------------------------------------
the contents of c:mag.txt is
7369,SMITH ,CLERK , 7902,17-DEC-02, 800, , 20
7499,ALLEN ,SALESMAN , 7698,20-FEB-81, 1600, 300, 30
7521,WARD ,SALESMAN , 7698,22-FEB-81, 1250, 500, 30
7566,JONES ,MANAGER , 7839,02-APR-81, 2975, , 20
7654,MARTIN ,SALESMAN , 7698,28-SEP-81, 1250, 1400, 30
7698,BLAKE ,MANAGER , 7839,01-MAY-81, 2850, , 30
7782,CLARK ,MANAGER , 7839,09-JUN-81, 2450, , 10
7788,SCOTT ,ANALYST , 7566,09-DEC-82, 3000, , 20
7839,KING ,PRESIDENT, ,17-NOV-81, 5000, , 10
7844,TURNER ,SALESMAN , 7698,08-SEP-81, 1500, 0, 30
7876,ADAMS ,CLERK , 7788,12-JAN-83, 1100, , 20
7900,JAMES ,CLERK , 7698,03-DEC-81, 950, , 30
7902,FORD ,ANALYST , 7566,03-DEC-81, 3000, , 20
7934,MILLER ,CLERK , 7782,23-JAN-82, 1300, , 10
Previous Topic: work around
Next Topic: setting a field to contain the word end?
Goto Forum:
  


Current Time: Thu Mar 28 09:36:47 CDT 2024