Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Plus Reporting
In article <6shqst$gge$1_at_nnrp1.dejanews.com>, vishmok_at_my-dejanews.com wrote:
> Hi!
>
> I want to generate a a tabular report using SQL Plus 3.3.
> This report requires separate select statement for each column of report, on
> same table.
>
> e.g.
>
> U_Valus Null_Values Z_Values >>>>>>> Report Headings
> R1 R2 R3 >>>>>>> Entries on the report
>
>
> Here R1 is
> "Select count(*)from table where table.column1 = "U";
> Here R2 is
> "Select count(*)from table where table.column1 is null;
> Here R3 is
> "Select count(*)from table where table.column1 = "Z";
>
>
select sum(decode(column1,'V',1,null)) "V_Values" ,sum(decode(column1,null,1,null)) "Null_Values" ,sum(decode(column1,'Z',1,null)) "Z_Values"from table
HTH
Chris Ellis
Received on Tue Sep 01 1998 - 18:43:04 CDT