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!

TRIMSPOOL????

650927Jul 19 2008 — edited Jul 19 2008
Good day All :

i've created the following table :

CREATE TABLE ABC
(A varchar2(255),
B varchar2(80),
C date)

now i need to select all the data in this table and spool it in a TAB Delimited file:

SET NEWPAGE NONE
SET SPACE 0
SET LINESIZE 800
SET PAGESIZE 700
SET TERMOUT OFF
SET TRIMOUT ON
SET TRIMSPOOL ON
SET ECHO OFF
SET FEEDBACK OFF
SET VERIFY OFF
SET HEADING ON
SET MARKUP HTML OFF
SET UNDERLINE OFF
col TAB# new_value TAB NOPRINT
select chr(9) TAB# from dual
set colsep "&TAB"
spool BSS_RESULT.txt
select * from ABC;
spool off
exit

PROBLEM:
the fields come with Trailing Spaces equal to the Field size
let's say field B has the data "1234", it'll add 76 spaces after the 1234

i tried RTRIM(B) but results are the same.


how can the data spool in the text file without trailing spaces??

Appreciate your help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 16 2008
Added on Jul 19 2008
9 comments
9,768 views