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: SQLPlus -- Newbie Question with formating

Re: SQLPlus -- Newbie Question with formating

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Sun, 20 Oct 2002 06:49:47 +0200
Message-ID: <0dd4rus4pmo3q3a5a3kp5i60uaa42b1bse@4ax.com>


On Sun, 20 Oct 2002 09:30:08 +0800, LT Cheah <LT_Cheah_at_army.net> wrote:

>Can some guru suggest how I could accomplish a simple
>formatting of skipping every 2 rows for a substring of
>a column. I want to do something like below:-
>
>BREAK ON SUBSTR(MY_COLUMN,1,3) SKIP 2
>SPOOL C:\DATA\MY_DATA
>SELECT * FROM MY_TABLE;
>SPOOL OFF
>CLEAR BREAKS
>
>To achieve the above what I'm currently doing is to create another
>table/view with an additional column SUBSTR(MY_COLUMN,1,3) AS "MY_GROUP"
>and then use BREAK ON MY_GROUP SKIP 2.
>
>Is there a work around without creating this table?
>
>
>
>-- Best Regards;
>Azman Cheah (azman_at_pop.jaring.my)
> Kulim, Kedah Darul Aman

simply
add the expression to your select
and add

column my_group noprint

NO NEED AT ALL for extra tables

Hth

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Sat Oct 19 2002 - 23:49:47 CDT

Original text of this message

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