Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.oracle -> Help writing an SQL Script

Help writing an SQL Script

From: Chuck100 <alan.terry74_at_btinternet.com>
Date: 5 Jul 2004 08:07:50 -0700
Message-ID: <eecdee57.0407050707.1458aae2@posting.google.com>


I'm having problems with the output of the following script (I've simplified it):-

select a.section,a.user,count(b.number),null from table a, table b
where.........
group by a.section,a.user
union
select a.section,a.user,null,count(c.number) from table a, table c
where .......
group by a.section, a.user

The output looks like this:-

Section       User        col A   col b

------- ---- ----- -----
section 1 user A 22 0 0 12 section 2 user d 10 0 0 9

I want the output to look like this:-

Section       User        col A   col b

------- ---- ----- -----
section 1 user A 22 12 section 2 user d 10 9

i.e I don't want a second line reflecting the statement after the union command. I want the entry to appear on the one line. I''m using Report Oracle Reports Builder to do the script

Thanks Received on Mon Jul 05 2004 - 10:07:50 CDT

Original text of this message

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