Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Extra space adding during spool data into text file

Harshal84Dec 9 2013 — edited Dec 9 2013

I'm using sql developer to query oracle tables. I can export data using GUI of sql developer, but I wish to use spool query to export the data. Using below query, I was able to export the data to specified location, but my final text file consist of additional spaces after each line. These additional spaces between each line is causing an error to upload the text file in different location.

Did any one face have this issue? Below is my query

set head off

SET FEEDBACK OFF

SET ECHO    OFF

SET TRIMSPOOL ON

SET TRIMOUT ON

spool c:\test.txt

select cast(memberid||',12'as varchar2(20))

from abc;

spool off

set head on

set ECHO on

i'm using trimspool, and trimout, but it is not removing any blank spaces.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2014
Added on Dec 9 2013
7 comments
2,829 views