Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help. SQL Syntax to create a master/detail report.
"Sam Talebbeik" <sam777t_at_yahoo.com> wrote in message
news:9ec3a1ef.0207261556.17edd686_at_posting.google.com...
> Folks,
>
> I need to create a simple master/detail report from a SELECT statement
> using SQL in Oracle. My query looks like :
>
> select last_name, project_name
> from projects
> order by last_name
>
> The output as you expect shows up as
> last_name project_name
> ---------- -------------
> sam xproj2
> sam xproj3
> dave dpro4
> dave dpro8
>
> How can I write a SQL to make the output look something like the following
> so that the repeating value in the last_name column does not show up for
each
> printed row:
>
> last_name project_name
> --------- -------------
> sam xproj2
> xproj3
> dave dpro4
> dpro8
>
> I can not purchase a report writing tool to do this.
>
> Regards,
> Sam
In your sql script put
break on last_name nodup
prior to the select
Hth
-- Sybrand Bakker Senior Oracle DBA to reply remove '-verwijderdit' from my e-mail addressReceived on Sat Jul 27 2002 - 00:18:53 CDT