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

Home -> Community -> Usenet -> c.d.o.misc -> [Fwd: Re: Having trouble with a query]

[Fwd: Re: Having trouble with a query]

From: KeyStroke (Jack L. Swayze Sr.) <KeyStrk_at_Feist.Com>
Date: Tue, 08 Dec 1998 00:05:31 -0600
Message-ID: <366CC1AB.2A2E977@Feist.Com>


From: Nick Butcher <nickb_at_btinternet.com> To: KeyStrk_at_Feist.Com

Still wrong:

select t.lname, t.fname, sum(v.balance_due) tot_bal_due



  from
(select adult_ssn ssn, balance_due

   from the_table
   where adult_ssn is not null
 union
 select ssn, balance_due
   from the_table
   where adult_ssn is null
) v, the_table t
  where t.ssn = v.ssn
  group by t.lname, t.fname
;

better than the function method though ;,)

Nick Received on Tue Dec 08 1998 - 00:05:31 CST

Original text of this message

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