trim off the write space
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: trim off the write space

  1. #1
    Join Date
    Oct 2000
    Posts
    250

    trim off the write space

    Hi all,
    I have a question on the trimming off the extra white space.

    SET LINESIZE 300

    f1 f2 f3
    aaaaa,bbbb,ccccc
    ddddd,eeee,fffff

    SELECT f1||chr(13),f2||chr(13),f3
    FROM

    aaaaa,
    bbbbb,
    ccccc < THERE are SOME big white space here >
    ddddd,
    eeeee,
    fffff < There are Some big white space here >

    What is the best way to remove off the big white space ?

    Thank You

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,448
    what the heck are those aaa bbb ccc? columns or what?
    if I write

    f1 f2 f3
    aaaaa,bbbb,ccccc
    ddddd,eeee,fffff

    in sqlplus prompt I will get error so I am not sure what you are talking about

  3. #3
    Join Date
    Oct 2000
    Posts
    250
    Sorry for unclear question,

    actually the aaaa,bbbb,cccc is already spool to a file format then I want it to be output into the vertical format for each record.

    That's why, after each field I concat with the CHR(13) but not the last column of the field. The last column always embeded some whitespace.

    Anyway, I solved the problem using SET TRIMSPOOL ON before run the script.

    Thanks for the feedback

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width