Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Export to flat file from Oracle
On Thu, 03 Dec 1998 21:26:15 GMT, mthyagaraj_at_neural.com wrote:
>Basic question: >I'd like to know how to trim extra spaces between columns generated during >spooled export to a flat file from a query. They are quote, comma delimited. >
try selecting all the columns concatted together.
eg.
SQL> set feedback off SQL> set heading off SQL> spool aaa.sql SQL> select '"'||empno||'","'||ename||'","'||job||'"' data from emp;"7902","FORD","ANALYST"
"7369","SMITH","CLERK"
"7499","ALLEN","SALESMAN"
"7521","WARD","SALESMAN"
"7566","JONES","MANAGER"
"7654","MARTIN","SALESMAN"
"7698","BLAKE","MANAGER"
"7782","CLARK","MANAGER"
"7788","SCOTT","ANALYST"
"7839","KING","PRESIDENT"
"7844","TURNER","SALESMAN"
"7876","ADAMS","CLERK"
"7900","JAMES","CLERK"
hope this helps.
chris.
>Thanks, >Manohar Thyagaraj > >-----------== Posted via Deja News, The Discussion Network ==---------- >http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
--
Chirstopher Beck
Oracle Corporation
clbeck_at_us.oracle.com
Reston, VA.
![]() |
![]() |