Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to turn-off SQL*PLUS character formatting for fixed datastream

Re: How to turn-off SQL*PLUS character formatting for fixed datastream

From: Michael S. Abbey <masint_at_istar.ca>
Date: 1998/05/05
Message-ID: <354f8555.376331646@news.istar.ca>#1/1

On Tue, 05 May 1998 15:37:57 -0400, Scot Balfour <scot.balfour_at_lmco.com> wrote:

>My customer has asked me to generate a datastream in a format that looks
>like this:
>
>123-45-6789,Balfour,Scot,X,Gaithersburg
>
>I have a query that selects the appropriate information and concatenates
>the comma delimiter between fields; however, SQL*PLUS is padding each
>field value with trailing blanks up to the length of the varchar2 field
>(defined at table create time). So my output looks like this:
>
>123-45-6789,Balfour ,Scot
>,X,Gaithersburg

Try rather than selecting the column names in order (or using the SELECT * construct) to code

  select c1||c2||c3 etc.

until all the columns have been included in the select list.

Michael

+------------------------------------
+  Michael S. Abbey    Ottawa Canada
+  Co-author of Oracle8: A Beginner's Guide
+ and 5 other works in the Oracle Press Series
+------------------------------------
Received on Tue May 05 1998 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US