Newsgroups: comp.databases.oracle
From: geje@schemat.demon.co.uk (Geert Jan Frese)
Subject: Re: SQLPlus output format
Distribution: world
References: <1t7st1$1a1@spock.dis.cccd.edu>
Organization: Schema Technology Ltd.
Reply-To: geje@mm01.demon.co.uk
X-Newsreader: Simple NEWS 1.90 (ka9q DIS 1.21)
Lines: 39
Date: Mon, 17 May 1993 14:52:44 +0000
Message-ID: <737650364snz@schemat.demon.co.uk>
Sender: usenet@demon.co.uk


In article <1t7st1$1a1@spock.dis.cccd.edu> paulk@spock.dis.cccd.edu writes:

>Hi, could anybody tell me if it is possible to get SQLPlus to display
>the result of a SELECT statement in the following format:
>
>column_1 = value
>column_2 = value
>.
>.
>.
>column_n = value
>
>Any help would be appreciated.
>Thanks in advance.
>
>Paul Krikorian
>Coast Community College District
>Costa Mesa, CA, USA
>--
>Paul Krikorian                   | Internet: paulk@spock.dis.cccd.edu
>Coast Community College District | Voice:    (714) 432-5150
>1370 Adams Ave.                  | Fax:      (714) 432-5062
>Costa Mesa, CA 92626, USA        |
>
Hello Paul.

The answer is very simple:

SET ARRAYSIZE 10
SET HEADING OFF
SET TAB OFF
SET LINESIZE 115
TTITLE ' Detail table information '
SELECT
   '   FIELD1                = ',RPAD(FIELD1,80),
   '   FIELD2                = ',RPAD(FIELD2,80),
   '   FIELD3                = ',RPAD(FIELD3,80),
   '   FIELD4                = ',RPAD(FIELD4,80),
FROM TABLE1;

Geert Jan

