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

From: Franklin Hsia <frank_at_news.wadsworth.org>
Date: 1995/05/22
Message-ID: <3pq6b2$7tr_at_pauling.wadsworth.org>#1/1


Hi:

I was helping a co-worker compose a SQL query for a report using SQL*PLUS v3.0 and am having problems.

What I am trying to do is to suppress duplicate values on every break, that is, for every Facility ID, I only want it to appear once for the first retrieved row. This makes the report look nicer. 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. The Facility ID (FAC.fac_id) repeats for every row just as if we did not use the BREAK ON command. So the question is, what are we missing in the query? What is the proper way to compose this query?

Frank

--
____________________________________________________________________________
     __.    Franklin W. Hsia                 Sr. Computer Programmer/Analyst
  __/  |    Wadsworth Center, Room D-420     Phone: (518) 473-0773
 /___ *|    New York State Dept of Health    Fax:   (518) 474-8590  
     \_| _  P.O. Box 509                     frank_at_wadsworth.org  
       ~~   Albany, New York 12201-0509 USA  Franklin.Hsia_at_wadsworth.org      
Received on Mon May 22 1995 - 00:00:00 CEST

Original text of this message