Re: help with SQL*Plus

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 04 Sep 1998 14:03:28 GMT
Message-ID: <361af2e5.176983578_at_192.86.155.100>


A copy of this was sent to Rob Mason <rmason_at_cellularsouth.net> (if that email address didn't require changing) On Fri, 04 Sep 1998 08:16:01 -0500, you wrote:

>I have a table that has an ID in multiple columns and the description of
>those ID's in another table. What is the best method (using SQL*Plus)
>that will allow me to display the text description on the same line with
>other text descriptions of ID's in the same row?
>

read the sqlplus manual and check out the COLUMN command for formatting.

For exmaple:

SQL> set linesize 100
SQL> column id format 999
SQL> column descr format a20 word_wrapped


and so on. You can use these commands to make each column come out formatted in the way you want.

>For example:
>
>select txt.descr, txt.descr
>from mydescr txt, myid id
>where id.idcolumn1=txt.id
>or id.idcolumn2=txt.id;
>
>
>mydescr
>---------
>1 Description 1
>2 Description 2
>3 Description 3
>
>myid
>---------------
>1
>2
>3
>
>Does this make sense?
>
>Thanks in advance for any help
>
>Rob Mason
>rmasonjr_at_cellularsouth.com
>
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/    -- downloadable utilities
 
----------------------------------------------------------------------------
Opinions are mine and do not necessarily reflect those of Oracle Corporation
 
Anti-Anti Spam Msg: if you want an answer emailed to you, 
you have to make it easy to get email to you.  Any bounced
email will be treated the same way i treat SPAM-- I delete it.
Received on Fri Sep 04 1998 - 16:03:28 CEST

Original text of this message