From: "Anton Buijs" <aammbuijs@xs4all.nl>
Newsgroups: comp.databases.oracle.server
Subject: Re: SQL*Plus formatting question
Date: Mon, 9 Sep 2002 23:13:52 +0200
Organization: XS4ALL Internet BV
Lines: 48
Message-ID: <alj2uf$23s$1@news1.xs4all.nl>
References: <3d7d02be.6150834@ausnews.austin.ibm.com>
NNTP-Posting-Host: 213.84.255.40
Mime-Version: 1.0
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Trace: news1.xs4all.nl 1031606031 2172 213.84.255.40 (9 Sep 2002 21:13:51 GMT)
X-Complaints-To: abuse@xs4all.nl
NNTP-Posting-Date: 9 Sep 2002 21:13:51 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200


Because of the concatenation the column names changed. You did not see that
because you set heading off (try once with set heading on).  So alias the
column names and format that alias name with the column command. Example:

colum COL1 format a20 newline

SELECT 'local_tran_id'||local_tran_id   col1
, ........

Ed Stevens <spamdump@nospam.noway.nohow> schreef in berichtnieuws
3d7d02be.6150834@ausnews.austin.ibm.com...
| Platform:  Oracle 8.1.7 on NT4 or NT2k
|
| Given the following snippet of code:
|
| set echo off
| set heading off
|  column LOCAL_TRAN_ID format a20 newline
|  column GLOBAL_TRAN_ID format a20 newline
|  column STATE format a20 newline
|  column MIXED format a20 newline
|  column ADVICE format a20 newline
| <snip more of same>
|
| select
|  'LOCAL_TRAN_ID: ' || LOCAL_TRAN_ID,
|  'GLOBAL_TRAN_ID: ' || GLOBAL_TRAN_ID,
|  'STATE: ' || STATE,
|  'MIXED: ' || MIXED,
|  'ADVICE: ' || ADVICE,
| <snip more of same>
|
| I expect each selected column to report on a separate line, thus:
|
| LOCAL_TRAN_ID: some value
| GLOBAL_TRAN_ID: some value
| STATE: collecting
| MIXED: no
| ADVICE: some value
|
| But what happens is STATE, MIXED, and ADVICE all display on the same line.
| Other columns, snipped from this example, do the same.
|
| I know I'm overlooking the obvious, but . . .
| --
| Ed Stevens
| (Opinions expressed do not necessarily represent those of my employer.)
 

