Re: HELP! SQL*PLUS V3.0 suppress dups in break column...

From: Doug Henderson <djhender_at_canuck.com>
Date: 1995/05/25
Message-ID: <3q21ko$rub_at_mp.canuck.com>#1/1


frank_at_news.wadsworth.org (Franklin Hsia) wrote:

><snip> The following is what we
>attempted:
 

>BREAK ON FAC.fac_id nodup on FAC.fac_name nodup skip 1
>select FAC.fac_id, FAC.fac_name, FAC_STA.sta_id
>from fac, fac_sta
>where FAC.end_rec_date is null
> and FAC_STA.end_rec_date is null
> and FAC.fac_id = FAC_STA.fac_id
>order by FAC.fac_id, FAC.fac_name
>;

>It didn't work. <snip>

BREAK is a SQL*Plus command, not a SQL command. As a result you must specify the unadorned column name or column alias in commands such as BREAK, COLUMN, etc.

The column name used by SQL*Plus is (literally) what you see as a default heading. e.g.

SELECT COUNT(*) FROM my_table;

COUNT(*)


     9999

Use a column alias to assign a more managable name to a column, e.g.

SELECT COUNT(*) row_count FROM my_table;

ROW_COUNT


    9999

So your break becomes
BREAK ON fac_id nodup on fac_name nodup skip 1

--
Doug Henderson, Glen Coulee Consulting, Calgary, Alberta
[Sent by Free Agent 0.55]
Received on Thu May 25 1995 - 00:00:00 CEST

Original text of this message