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

Home -> Community -> Usenet -> c.d.o.server -> Re: [SQL*Plus] Delimitting with pipe characters is possible?

Re: [SQL*Plus] Delimitting with pipe characters is possible?

From: mcstock <mcstockspamplug_at_spamdamenquery.com>
Date: Tue, 25 Nov 2003 08:33:16 -0500
Message-ID: <5-qdnXwGuqmpx16iRVn-gQ@comcast.com>


TRIM won't do it -- SQL*Plus still sizes the columns to the same width -- plus, that would require altering all expressions in the SELECT, might as well just concatenate everything

if there is a need to have pipe separators without extra spaces, COLSEP would work for the pipes, then the output file could be run thru something like SED or AWK to strip the extra spaces (converting the pipe + spaces to just a pipe)

other than that, a generic store procedure/function that accepts the query and outputs the columns concatenated may help -- but i don't think that level of effort is expected in this case

"Burt Peltier" <burttemp1ReMoVeThIs_at_bellsouth.net> wrote in message news:87Cwb.4839$I7.480_at_bignews6.bellsouth.net...
| I am in agreement (I think :) ) ... the problem is we have to assume since
| the "question" was not really clear.
|
| I also thought "no spaces" was significant.
|
| I suppose/guess the OP could maybe use the TRIM function with colsep and
get
| what they want.
|
| --
| "Hans Forbrich" <forbrich_at_bad_address.net> wrote in message
| news:3FC27A3C.5B16EDF9_at_bad_address.net...
| > Burt Peltier wrote:
| > >
| > > There was a question ? :)
| > >
| >
| > Original request was 'how to change the default SQL*Plus output to use
| > '|' between fields'. The associated example had no spaces between the
| > data values and the column separator.
| >
| > Perhaps a silly assumption, but I thought the lack of spaces around the
| > col separator was significant. Not remembering whether colsep
| > suppressed the extra padding, I suggested looking it up. When Mladen
| > bluntly gave the colsep response, I simply asked whether that helps with
| > the spacing (but perhaps should have said column separation padding).
| >
| > <sigh>
|
|
Received on Tue Nov 25 2003 - 07:33:16 CST

Original text of this message

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